conflict_resolution
stringlengths
27
16k
<<<<<<< CommonHelper.assertNotNull("key", key); ======= >>>>>>> <<<<<<< verified = signedJWT.verify(verifier); ======= >>>>>>> verified = signedJWT.verify(verifier); } if (!verified) { final String message = "JWT verification failed: " + token; throw new CredentialsException(message); } try { createJwtProfile(credentials, jwt); } catch (final Exception e) { throw new TechnicalException("Cannot get claimSet", e); }
<<<<<<< import org.pac4j.core.exception.HttpAction; ======= import org.pac4j.core.exception.RequiresHttpAction; import org.pac4j.oauth.credentials.OAuth10Credentials; >>>>>>> import org.pac4j.core.exception.HttpAction; import org.pac4j.oauth.credentials.OAuth10Credentials; <<<<<<< protected OAuth1Token getAccessToken(final OAuthCredentials credentials) throws HttpAction { final OAuth1RequestToken tokenRequest = (OAuth1RequestToken) credentials.getRequestToken(); final String token = credentials.getToken(); final String verifier = credentials.getVerifier(); ======= protected OAuth1Token getAccessToken(final OAuthCredentials credentials) throws RequiresHttpAction { OAuth10Credentials oAuth10Credentials = (OAuth10Credentials) credentials; final OAuth1RequestToken tokenRequest = oAuth10Credentials.getRequestToken(); final String token = oAuth10Credentials.getToken(); final String verifier = oAuth10Credentials.getVerifier(); >>>>>>> protected OAuth1Token getAccessToken(final OAuthCredentials credentials) throws HttpAction { OAuth10Credentials oAuth10Credentials = (OAuth10Credentials) credentials; final OAuth1RequestToken tokenRequest = oAuth10Credentials.getRequestToken(); final String token = oAuth10Credentials.getToken(); final String verifier = oAuth10Credentials.getVerifier();
<<<<<<< public void testOk() throws HttpAction { final OAuthCredentials oauthCredential = (OAuthCredentials) getClient() .getCredentials(MockWebContext.create().addRequestParameter(BaseOAuth20Client.OAUTH_CODE, CODE)); ======= public void testOk() throws RequiresHttpAction { final OAuth20Credentials oauthCredential = (OAuth20Credentials) getClient() .getCredentials(MockWebContext.create().addRequestParameter(BaseOAuth20Client.OAUTH_CODE, CODE)); >>>>>>> public void testOk() throws HttpAction { final OAuth20Credentials oauthCredential = (OAuth20Credentials) getClient() .getCredentials(MockWebContext.create().addRequestParameter(BaseOAuth20Client.OAUTH_CODE, CODE));
<<<<<<< logger.warn("Returned url:"); final Scanner scanner = new Scanner(System.in, HttpConstants.UTF8_ENCODING); final String returnedUrl = scanner.nextLine().trim(); ======= logger.warn("Returned url (copy/paste the fragment starting before the question mark of the query string):"); Scanner scanner = new Scanner(System.in, HttpConstants.UTF8_ENCODING); final String returnedUrl = scanner.nextLine(); >>>>>>> logger.warn("Returned url (copy/paste the fragment starting before the question mark of the query string):"); final Scanner scanner = new Scanner(System.in, HttpConstants.UTF8_ENCODING); final String returnedUrl = scanner.nextLine().trim();
<<<<<<< import java.util.Map; import org.codehaus.jackson.JsonNode; ======= >>>>>>> import java.util.Map;
<<<<<<< import org.pac4j.core.exception.HttpAction; import org.pac4j.oauth.exception.OAuthCredentialsException; ======= import org.pac4j.core.exception.RequiresHttpAction; >>>>>>> import org.pac4j.core.exception.HttpAction; <<<<<<< protected Token getAccessToken(final OAuthCredentials credentials) throws HttpAction { ======= protected OAuth2AccessToken getAccessToken(final OAuthCredentials credentials) throws RequiresHttpAction { >>>>>>> protected OAuth2AccessToken getAccessToken(final OAuthCredentials credentials) throws HttpAction {
<<<<<<< protected abstract Token getAccessToken(OAuthCredentials credentials) throws HttpAction; ======= protected abstract T getAccessToken(OAuthCredentials credentials) throws RequiresHttpAction; >>>>>>> protected abstract T getAccessToken(OAuthCredentials credentials) throws HttpAction; <<<<<<< protected U retrieveUserProfileFromToken(final Token accessToken) throws HttpAction { ======= protected U retrieveUserProfileFromToken(final T accessToken) throws RequiresHttpAction { >>>>>>> protected U retrieveUserProfileFromToken(final T accessToken) throws HttpAction {
<<<<<<< import org.pac4j.core.exception.HttpAction; ======= import org.pac4j.core.exception.RequiresHttpAction; import org.pac4j.oauth.credentials.OAuth20Credentials; >>>>>>> import org.pac4j.core.exception.HttpAction; import org.pac4j.oauth.credentials.OAuth20Credentials; <<<<<<< protected OAuthCredentials getOAuthCredentials(final WebContext context) throws HttpAction { final String verifierParameter = context.getRequestParameter(OAUTH_CODE); if (verifierParameter != null) { final String verifier = OAuthEncoder.decode(verifierParameter); logger.debug("verifier: {}", verifier); return new OAuthCredentials(verifier, getName()); ======= protected OAuthCredentials getOAuthCredentials(final WebContext context) throws RequiresHttpAction { final String codeParameter = context.getRequestParameter(OAUTH_CODE); if (codeParameter != null) { final String code = OAuthEncoder.decode(codeParameter); logger.debug("code: {}", code); return new OAuth20Credentials(code, getName()); >>>>>>> protected OAuthCredentials getOAuthCredentials(final WebContext context) throws HttpAction { final String codeParameter = context.getRequestParameter(OAUTH_CODE); if (codeParameter != null) { final String code = OAuthEncoder.decode(codeParameter); logger.debug("code: {}", code); return new OAuth20Credentials(code, getName()); <<<<<<< protected OAuth2AccessToken getAccessToken(final OAuthCredentials credentials) throws HttpAction { ======= protected OAuth2AccessToken getAccessToken(final OAuthCredentials credentials) throws RequiresHttpAction { OAuth20Credentials oAuth20Credentials = (OAuth20Credentials) credentials; >>>>>>> protected OAuth2AccessToken getAccessToken(final OAuthCredentials credentials) throws HttpAction { OAuth20Credentials oAuth20Credentials = (OAuth20Credentials) credentials;
<<<<<<< newProvider.setScope(this.scope); newProvider.setFields(this.fields); newProvider.setLimit(this.limit); newProvider.setState(this.state); ======= newProvider.setScope(this.scope); newProvider.setFields(this.fields); newProvider.setLimit(this.limit); >>>>>>> newProvider.setScope(this.scope); newProvider.setFields(this.fields); newProvider.setLimit(this.limit); <<<<<<< if (StringHelper.isNotBlank(this.state)) { // When a Facebook state parameter has been specified if (StringHelper.isNotBlank(this.scope)) { this.service = new ServiceBuilder().provider(ExtendedFacebookApi.class).apiKey(this.key) .apiSecret(this.secret).callback(this.callbackUrl).scope(this.scope).build(); } else { this.service = new ServiceBuilder().provider(ExtendedFacebookApi.class).apiKey(this.key) .apiSecret(this.secret).callback(this.callbackUrl).build(); } ======= if (StringHelper.isNotBlank(this.scope)) { this.service = new ServiceBuilder().provider(FacebookApi.class).apiKey(this.key).apiSecret(this.secret) .callback(this.callbackUrl).scope(this.scope).build(); >>>>>>> if (StringHelper.isNotBlank(this.scope)) { this.service = new ServiceBuilder().provider(ExtendedFacebookApi.class).apiKey(this.key) .apiSecret(this.secret).callback(this.callbackUrl).scope(this.scope).build(); <<<<<<< if (StringHelper.isNotBlank(this.scope)) { this.service = new ServiceBuilder().provider(FacebookApi.class).apiKey(this.key).apiSecret(this.secret) .callback(this.callbackUrl).scope(this.scope).build(); } else { this.service = new ServiceBuilder().provider(FacebookApi.class).apiKey(this.key).apiSecret(this.secret) .callback(this.callbackUrl).build(); } ======= this.service = new ServiceBuilder().provider(FacebookApi.class).apiKey(this.key).apiSecret(this.secret) .callback(this.callbackUrl).build(); >>>>>>> this.service = new ServiceBuilder().provider(ExtendedFacebookApi.class).apiKey(this.key) .apiSecret(this.secret).callback(this.callbackUrl).build(); <<<<<<< this.extractData(profile, json, FacebookAttributesDefinition.FRIENDS); this.extractData(profile, json, FacebookAttributesDefinition.MOVIES); this.extractData(profile, json, FacebookAttributesDefinition.MUSIC); this.extractData(profile, json, FacebookAttributesDefinition.BOOKS); this.extractData(profile, json, FacebookAttributesDefinition.LIKES); this.extractData(profile, json, FacebookAttributesDefinition.ALBUMS); this.extractData(profile, json, FacebookAttributesDefinition.EVENTS); this.extractData(profile, json, FacebookAttributesDefinition.GROUPS); ======= extractData(profile, json, FacebookAttributesDefinition.FRIENDS); extractData(profile, json, FacebookAttributesDefinition.MOVIES); extractData(profile, json, FacebookAttributesDefinition.MUSIC); extractData(profile, json, FacebookAttributesDefinition.BOOKS); extractData(profile, json, FacebookAttributesDefinition.LIKES); extractData(profile, json, FacebookAttributesDefinition.ALBUMS); extractData(profile, json, FacebookAttributesDefinition.EVENTS); extractData(profile, json, FacebookAttributesDefinition.GROUPS); extractData(profile, json, FacebookAttributesDefinition.MUSIC_LISTENS); >>>>>>> this.extractData(profile, json, FacebookAttributesDefinition.FRIENDS); this.extractData(profile, json, FacebookAttributesDefinition.MOVIES); this.extractData(profile, json, FacebookAttributesDefinition.MUSIC); this.extractData(profile, json, FacebookAttributesDefinition.BOOKS); this.extractData(profile, json, FacebookAttributesDefinition.LIKES); this.extractData(profile, json, FacebookAttributesDefinition.ALBUMS); this.extractData(profile, json, FacebookAttributesDefinition.EVENTS); this.extractData(profile, json, FacebookAttributesDefinition.GROUPS); this.extractData(profile, json, FacebookAttributesDefinition.MUSIC_LISTENS);
<<<<<<< /** * A utility class for validating {@link AccumuloConfiguration} instances. */ ======= /** * A utility class for checking over configuration entries. */ >>>>>>> /** * A utility class for validating {@link AccumuloConfiguration} instances. */ <<<<<<< /** * Validates the given configuration. A valid configuration contains only * valid properties (i.e., defined or otherwise valid) that are not prefixes * and whose values are formatted correctly for their property types. A valid * configuration also contains a value for property * {@link Property#INSTANCE_ZK_TIMEOUT} within a valid range. * * @param acuconf configuration * @throws RuntimeException if the configuration fails validation */ public static void validate(AccumuloConfiguration acuconf) { for (Entry<String,String> entry : acuconf) { ======= /** * Validates the given configuration entries. * * @param entries iterable through configuration keys and values * @throws SanityCheckException if a fatal configuration error is found */ public static void validate(Iterable<Entry<String,String>> entries) { String instanceZkTimeoutKey = Property.INSTANCE_ZK_TIMEOUT.getKey(); String instanceZkTimeoutValue = null; for (Entry<String,String> entry : entries) { >>>>>>> /** * Validates the given configuration entries. A valid configuration contains only * valid properties (i.e., defined or otherwise valid) that are not prefixes * and whose values are formatted correctly for their property types. A valid * configuration also contains a value for property * {@link Property#INSTANCE_ZK_TIMEOUT} within a valid range. * * @param entries iterable through configuration keys and values * @throws SanityCheckException if a fatal configuration error is found */ public static void validate(Iterable<Entry<String,String>> entries) { String instanceZkTimeoutKey = Property.INSTANCE_ZK_TIMEOUT.getKey(); String instanceZkTimeoutValue = null; for (Entry<String,String> entry : entries) {
<<<<<<< * @throws NotFoundException * If the activity does not exist * @throws BadRequestException * If the comment is invalid (of zero length) * @see javastrava.api.v3.service.ActivityService#createComment(java.lang.Integer, java.lang.String) ======= * @throws NotFoundException If the activity does not exist * @throws BadRequestException If the comment is invalid (of zero length) * @see javastrava.api.v3.service.ActivityService#createComment(java.lang.Long, java.lang.String) >>>>>>> * @throws NotFoundException * If the activity does not exist * @throws BadRequestException * If the comment is invalid (of zero length) * @see javastrava.api.v3.service.ActivityService#createComment(java.lang.Long, java.lang.String) <<<<<<< * @throws NotFoundException * If the activity does not exist * @see javastrava.api.v3.service.ActivityService#deleteActivity(java.lang.Integer) ======= * @throws NotFoundException If the activity does not exist * @see javastrava.api.v3.service.ActivityService#deleteActivity(java.lang.Long) >>>>>>> * @throws NotFoundException * If the activity does not exist * @see javastrava.api.v3.service.ActivityService#deleteActivity(java.lang.Long) <<<<<<< * @throws NotFoundException * If the activity does not exist * @see javastrava.api.v3.service.ActivityService#deleteActivityAsync(java.lang.Integer) ======= * @throws NotFoundException If the activity does not exist * @see javastrava.api.v3.service.ActivityService#deleteActivityAsync(java.lang.Long) >>>>>>> * @throws NotFoundException * If the activity does not exist * @see javastrava.api.v3.service.ActivityService#deleteActivityAsync(java.lang.Long) <<<<<<< * @param activityId * Activity identifier * @param commentId * Comment identifier * @throws NotFoundException * If the comment does not exist * @see javastrava.api.v3.service.ActivityService#deleteComment(java.lang.Integer, java.lang.Integer) ======= * @param activityId Activity identifier * @param commentId Comment identifier * @throws NotFoundException If the comment does not exist * @see javastrava.api.v3.service.ActivityService#deleteComment(java.lang.Long, java.lang.Integer) >>>>>>> * @param activityId * Activity identifier * @param commentId * Comment identifier * @throws NotFoundException * If the comment does not exist * @see javastrava.api.v3.service.ActivityService#deleteComment(java.lang.Long, java.lang.Integer) <<<<<<< * @param activityId * Activity identifier * @param commentId * Comment identifier * @throws NotFoundException * If the comment does not exist * @see javastrava.api.v3.service.ActivityService#deleteCommentAsync(java.lang.Integer, java.lang.Integer) ======= * @param activityId Activity identifier * @param commentId Comment identifier * @throws NotFoundException If the comment does not exist * @see javastrava.api.v3.service.ActivityService#deleteCommentAsync(java.lang.Long, java.lang.Integer) >>>>>>> * @param activityId * Activity identifier * @param commentId * Comment identifier * @throws NotFoundException * If the comment does not exist * @see javastrava.api.v3.service.ActivityService#deleteCommentAsync(java.lang.Long, java.lang.Integer) <<<<<<< * @param activityId * Activity identifier * @throws NotFoundException * If the activity does not exist on Strava * @see javastrava.api.v3.service.ActivityService#giveKudos(java.lang.Integer) ======= * @param activityId Activity identifier * @throws NotFoundException If the activity does not exist on Strava * @see javastrava.api.v3.service.ActivityService#giveKudos(java.lang.Long) >>>>>>> * @param activityId * Activity identifier * @throws NotFoundException * If the activity does not exist on Strava * @see javastrava.api.v3.service.ActivityService#giveKudos(java.lang.Long) <<<<<<< * @param activityId * Activity identifier * @throws NotFoundException * If the activity does not exist on Strava * @see javastrava.api.v3.service.ActivityService#giveKudosAsync(java.lang.Integer) ======= * @param activityId Activity identifier * @throws NotFoundException If the activity does not exist on Strava * @see javastrava.api.v3.service.ActivityService#giveKudosAsync(java.lang.Long) >>>>>>> * @param activityId * Activity identifier * @throws NotFoundException * If the activity does not exist on Strava * @see javastrava.api.v3.service.ActivityService#giveKudosAsync(java.lang.Long) <<<<<<< * @param activityId * Activity identifier * @param pagingInstruction * Paging instruction * @return List of comments on the activity, according to the paging instruction, or <code>null</code> if the activity does not * exist * @see javastrava.api.v3.service.ActivityService#listActivityComments(java.lang.Integer, javastrava.util.Paging) ======= * @param activityId Activity identifier * @param pagingInstruction Paging instruction * @return List of comments on the activity, according to the paging instruction, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listActivityComments(java.lang.Long, javastrava.util.Paging) >>>>>>> * @param activityId * Activity identifier * @param pagingInstruction * Paging instruction * @return List of comments on the activity, according to the paging instruction, or <code>null</code> if the activity does not * exist * @see javastrava.api.v3.service.ActivityService#listActivityComments(java.lang.Long, javastrava.util.Paging) <<<<<<< * @param activityId * Activity identifier * @return List of athletes who have given kudos to the activity, first page only, or <code>null</code> if the activity does not * exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoers(java.lang.Integer) ======= * @param activityId Activity identifier * @return List of athletes who have given kudos to the activity, first page only, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoers(java.lang.Long) >>>>>>> * @param activityId * Activity identifier * @return List of athletes who have given kudos to the activity, first page only, or <code>null</code> if the activity does not * exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoers(java.lang.Long) <<<<<<< * @param activityId * Activity identifier * @param pagingInstruction * Paging instruction * @return List of athletes who have given kudos to the activity, according with the paging instruction, or <code>null</code> if * the activity does not exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoers(java.lang.Integer, javastrava.util.Paging) ======= * @param activityId Activity identifier * @param pagingInstruction Paging instruction * @return List of athletes who have given kudos to the activity, according with the paging instruction, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoers(java.lang.Long, javastrava.util.Paging) >>>>>>> * @param activityId * Activity identifier * @param pagingInstruction * Paging instruction * @return List of athletes who have given kudos to the activity, according with the paging instruction, or <code>null</code> if * the activity does not exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoers(java.lang.Long, javastrava.util.Paging) <<<<<<< * @param activityId * Activity identifier * @return List of athletes who have given kudos to the activity, first page only, or <code>null</code> if the activity does not * exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoersAsync(java.lang.Integer) ======= * @param activityId Activity identifier * @return List of athletes who have given kudos to the activity, first page only, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoersAsync(java.lang.Long) >>>>>>> * @param activityId * Activity identifier * @return List of athletes who have given kudos to the activity, first page only, or <code>null</code> if the activity does not * exist * @see javastrava.api.v3.service.ActivityService#listActivityKudoersAsync(java.lang.Long) <<<<<<< * @param activityId * Activity identifier * @return List of activities that Strava has determined were done 'with' the identified activity, or <code>null</code> if the * activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivities(java.lang.Integer) ======= * @param activityId Activity identifier * @return List of activities that Strava has determined were done 'with' the identified activity, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivities(java.lang.Long) >>>>>>> * @param activityId * Activity identifier * @return List of activities that Strava has determined were done 'with' the identified activity, or <code>null</code> if the * activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivities(java.lang.Long) <<<<<<< * @param activityId * Activity identifier * @param pagingInstruction * Paging instruction * @return List of activities that Strava has determined were done 'with' the identified activity, according with the paging * instruction, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivities(java.lang.Integer, javastrava.util.Paging) ======= * @param activityId Activity identifier * @param pagingInstruction Paging instruction * @return List of activities that Strava has determined were done 'with' the identified activity, according with the paging instruction, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivities(java.lang.Long, javastrava.util.Paging) >>>>>>> * @param activityId * Activity identifier * @param pagingInstruction * Paging instruction * @return List of activities that Strava has determined were done 'with' the identified activity, according with the paging * instruction, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivities(java.lang.Long, javastrava.util.Paging) <<<<<<< * @param activityId * Activity identifier * @return List of activities that Strava has determined were done 'with' the identified activity, or <code>null</code> if the * activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivitiesAsync(java.lang.Integer) ======= * @param activityId Activity identifier * @return List of activities that Strava has determined were done 'with' the identified activity, or <code>null</code> if the activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivitiesAsync(java.lang.Long) >>>>>>> * @param activityId * Activity identifier * @return List of activities that Strava has determined were done 'with' the identified activity, or <code>null</code> if the * activity does not exist * @see javastrava.api.v3.service.ActivityService#listRelatedActivitiesAsync(java.lang.Long) <<<<<<< * @throws NotFoundException * If the activity with the given id does not exist * @see javastrava.api.v3.service.ActivityService#updateActivity(java.lang.Integer, * javastrava.api.v3.model.StravaActivityUpdate) ======= * @throws NotFoundException If the activity with the given id does not exist * @see javastrava.api.v3.service.ActivityService#updateActivity(java.lang.Long, javastrava.api.v3.model.StravaActivityUpdate) >>>>>>> * @throws NotFoundException * If the activity with the given id does not exist * @see javastrava.api.v3.service.ActivityService#updateActivity(java.lang.Long, javastrava.api.v3.model.StravaActivityUpdate)
<<<<<<< import org.apache.commons.collections4.MapUtils; import org.apache.log4j.Logger; ======= >>>>>>>
<<<<<<< import org.crandor.game.node.entity.player.link.quest.NeoQuestRepository; ======= import org.crandor.game.node.entity.player.link.prayer.crest.CrestCities; >>>>>>> import org.crandor.game.node.entity.player.link.quest.NeoQuestRepository; import org.crandor.game.node.entity.player.link.prayer.crest.CrestCities; <<<<<<< public NeoQuestRepository getNeoQuestRepository() {return neoQuestRepository;} ======= public CrestCities getCrest() { return crest; } public boolean setCrest(CrestCities crest) { if (CrestCities.eligable(crest, this)) { this.crest = crest; return true; } return false; } >>>>>>> public NeoQuestRepository getNeoQuestRepository() {return neoQuestRepository;} public CrestCities getCrest() { return crest; } public boolean setCrest(CrestCities crest) { if (CrestCities.eligable(crest, this)) { this.crest = crest; return true; } return false; }
<<<<<<< import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; import java.nio.charset.Charset; >>>>>>> import static java.nio.charset.StandardCharsets.UTF_8; <<<<<<< ======= /** * @deprecated since 1.5.3, 1.6.2; statically import Guava's {@link Charsets#UTF_8} or Java 7's built-in StandardCharsets.UTF_8 or use * {@link Charset#forName(String)} with "UTF-8" instead */ @Deprecated public static final Charset UTF8 = UTF_8; >>>>>>> <<<<<<< public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(StandardCharsets.UTF_8); ======= public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(UTF_8); >>>>>>> public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(UTF_8);
<<<<<<< npc("Hear ye! Hear ye! Player Moderators massive help to ", GameWorld.getName().substring(0, GameWorld.getName().length() - 3) + "-"); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hear ye! Hear ye! Player Moderators massive help to ", GameWorld.getSettings().getName() + "!"); >>>>>>> npc("Hear ye! Hear ye! Player Moderators massive help to ", GameWorld.getSettings().getName().substring(0, GameWorld.getSettings().getName().length() - 3) + "-"); <<<<<<< options("Tell me about Player Moderators.", "Tell me about the Rules of " + GameWorld.getName() + ".", "Can you give me a handy tip please?", "Bye!"); ======= interpreter.sendOptions("Select an Option", "Tell me about Player Moderators.", "Tell me about the Rules of " + GameWorld.getSettings().getName() + ".", "Can you give me a handy tip please?", "Bye!"); >>>>>>> options("Tell me about Player Moderators.", "Tell me about the Rules of " + GameWorld.getSettings().getName() + ".", "Can you give me a handy tip please?", "Bye!"); <<<<<<< player("Tell me about the Rules of " + GameWorld.getName() + "."); ======= interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Tell me about the Rules of " + GameWorld.getSettings().getName() + "."); >>>>>>> player("Tell me about the Rules of " + GameWorld.getSettings().getName() + "."); <<<<<<< npc("" + GameWorld.getName() + " will never email you asking for your log-in details."); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "" + GameWorld.getSettings().getName() + " will never email you asking for your log-in details."); >>>>>>> npc("" + GameWorld.getSettings().getName() + " will never email you asking for your log-in details."); <<<<<<< npc("Player Moderators, or 'P-mods', have the ability to mute", "rule breakers and " + GameWorld.getName() + " view their reports as a priority so", "that reward is taken as quickly as possible. P-Mods also", "have acces to the Player Moderator Centre. Within the"); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Player Moderators, or 'P-mods', have the ability to mute", "rule breakers and " + GameWorld.getSettings().getName() + " view their reports as a priority so", "that reward is taken as quickly as possible. P-Mods also", "have acces to the Player Moderator Centre. Within the"); >>>>>>> npc("Player Moderators, or 'P-mods', have the ability to mute", "rule breakers and " + GameWorld.getSettings().getName() + " view their reports as a priority so", "that reward is taken as quickly as possible. P-Mods also", "have acces to the Player Moderator Centre. Within the"); <<<<<<< npc("Centre are tools to help them Moderate " + GameWorld.getName() + ".", "These tools include dedicated forums, the Player", "Moderator Guidelines and the Player Moderator Code of", "Conduct."); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Centre are tools to help them Moderate " + GameWorld.getSettings().getName() + ".", "These tools include dedicated forums, the Player", "Moderator Guidelines and the Player Moderator Code of", "Conduct."); >>>>>>> npc("Centre are tools to help them Moderate " + GameWorld.getSettings().getName() + ".", "These tools include dedicated forums, the Player", "Moderator Guidelines and the Player Moderator Code of", "Conduct."); <<<<<<< npc("" + GameWorld.getName() + " picks players who spend their time and effort to", "help better the " + GameWorld.getName() + " community. To increase your", "chances of becoming a Player Moderator:"); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "" + GameWorld.getSettings().getName() + " picks players who spend their time and effort to", "help better the " + GameWorld.getSettings().getName() + " community. To increase your", "chances of becoming a Player Moderator:"); >>>>>>> npc("" + GameWorld.getSettings().getName() + " picks players who spend their time and effort to", "help better the " + GameWorld.getSettings().getName() + " community. To increase your", "chances of becoming a Player Moderator:"); <<<<<<< npc("Play by the rules! The rules of " + GameWorld.getName() + " are enforced", "for a reason, to make the game a fair and enjoyable", "environment for all."); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Play by the rules! The rules of " + GameWorld.getSettings().getName() + " are enforced", "for a reason, to make the game a fair and enjoyable", "environment for all."); >>>>>>> npc("Play by the rules! The rules of " + GameWorld.getSettings().getName() + " are enforced", "for a reason, to make the game a fair and enjoyable", "environment for all."); <<<<<<< npc("Report accuratley! When " + GameWorld.getName() + " consider an account for", "review they look for quality, not quantity. Ensure your", "reports are of a high quality by following the report", "guidelines."); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Report accuratley! When " + GameWorld.getSettings().getName() + " consider an account for", "review they look for quality, not quantity. Ensure your", "reports are of a high quality by following the report", "guidelines."); >>>>>>> npc("Report accuratley! When " + GameWorld.getSettings().getName() + " consider an account for", "review they look for quality, not quantity. Ensure your", "reports are of a high quality by following the report", "guidelines."); <<<<<<< npc("P-Mods cannot ban your account - they can only report", "offences. " + GameWorld.getName() + " then take reward based on the evidence", "received. If you lose your password or get scamme dby", "another player, P_Mods cannot help you get your account"); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "P-Mods cannot ban your account - they can only report", "offences. " + GameWorld.getSettings().getName() + " then take reward based on the evidence", "received. If you lose your password or get scamme dby", "another player, P_Mods cannot help you get your account"); >>>>>>> npc("P-Mods cannot ban your account - they can only report", "offences. " + GameWorld.getSettings().getName() + " then take reward based on the evidence", "received. If you lose your password or get scamme dby", "another player, P_Mods cannot help you get your account"); <<<<<<< npc("back. All they can do is recommend you to go to Player", "Support. They cannot retrieve any items you may have", "lost and they certainly do not recieve any free items", "from " + GameWorld.getName() + " for moderating the game. They are players"); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "back. All they can do is recommend you to go to Player", "Support. They cannot retrieve any items you may have", "lost and they certainly do not recieve any free items", "from " + GameWorld.getSettings().getName() + " for moderating the game. They are players"); >>>>>>> npc("back. All they can do is recommend you to go to Player", "Support. They cannot retrieve any items you may have", "lost and they certainly do not recieve any free items", "from " + GameWorld.getSettings().getName() + " for moderating the game. They are players"); <<<<<<< npc("who give their all to help the community, out of the", "goodness of their hearts! P-mods do not work for " + GameWorld.getName() + "", "and so cannot make you a Moderator, or recommend", "other accounts to become Moderators. If you wish yo"); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "who give their all to help the community, out of the", "goodness of their hearts! P-mods do not work for " + GameWorld.getSettings().getName() + "", "and so cannot make you a Moderator, or recommend", "other accounts to become Moderators. If you wish yo"); >>>>>>> npc("who give their all to help the community, out of the", "goodness of their hearts! P-mods do not work for " + GameWorld.getSettings().getName() + "", "and so cannot make you a Moderator, or recommend", "other accounts to become Moderators. If you wish yo");
<<<<<<< npc("Hello. Welcome to the " + GameWorld.getName() + " Housing Agency! What", "can I do for you?"); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hello. Welcome to the " + GameWorld.getSettings().getName() + " Housing Agency! What", "can I do for you?"); >>>>>>> npc("Hello. Welcome to the " + GameWorld.getSettings().getName() + " Housing Agency! What", "can I do for you?"); <<<<<<< npc("They created several folded-space regions across", "" + GameWorld.getName() + ". Each one contains hundreds of small plots", "where people can build houses."); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "They created several folded-space regions across", "" + GameWorld.getSettings().getName() + ". Each one contains hundreds of small plots", "where people can build houses."); >>>>>>> npc("They created several folded-space regions across", "" + GameWorld.getSettings().getName() + ". Each one contains hundreds of small plots", "where people can build houses."); <<<<<<< npc("There are various other people across " + GameWorld.getName() + " who can", "help you furnish your house. You should start buying", "planks from the sawmill operator in Varrock."); ======= interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "There are various other people across " + GameWorld.getSettings().getName() + " who can", "help you furnish your house. You should start buying", "planks from the sawmill operator in Varrock."); >>>>>>> npc("There are various other people across " + GameWorld.getSettings().getName() + " who can", "help you furnish your house. You should start buying", "planks from the sawmill operator in Varrock.");
<<<<<<< ======= import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Map; import core.game.system.config.NPCConfigParser; import core.tools.StringUtils; >>>>>>>
<<<<<<< import java.util.Map; ======= import de.fraunhofer.iosb.ilt.sta.settings.PersistenceSettings; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; >>>>>>> import de.fraunhofer.iosb.ilt.sta.settings.PersistenceSettings; import java.util.Map; <<<<<<< public TableRef copy(); ======= public boolean isEmpty() { return type == null && qPath == null; } } /** * The logger for this class. */ private static final Logger LOGGER = LoggerFactory.getLogger(PathSqlBuilder.class); /** * The prefix used for table aliases. The main entity is always * &lt;PREFIX&gt;1. */ public static final String ALIAS_PREFIX = "e"; private SQLQueryFactory queryFactory; private SQLQuery<Tuple> sqlQuery; private Set<EntityProperty> selectedProperties; private final TableRef lastPath = new TableRef(); private TableRef mainTable; private int aliasNr = 0; private boolean isFilter = false; private boolean needsDistinct = false; public synchronized SQLQuery<Tuple> buildFor(ResourcePath path, Query query, SQLQueryFactory sqlQueryFactory, PersistenceSettings settings) { this.queryFactory = sqlQueryFactory; selectedProperties = new HashSet<>(); sqlQuery = queryFactory.select(new Expression<?>[]{}); lastPath.clear(); aliasNr = 0; List<ResourcePathElement> elements = new ArrayList<>(path.getPathElements()); int count = elements.size(); for (int i = count - 1; i >= 0; i--) { ResourcePathElement element = elements.get(i); element.visit(this); } if (query != null) { boolean distict = false; PgExpressionHandler handler = new PgExpressionHandler(this, mainTable.copy()); for (OrderBy ob : query.getOrderBy()) { handler.addOrderbyToQuery(ob, sqlQuery); } if (needsDistinct) { sqlQuery.distinct(); distict = true; } isFilter = true; needsDistinct = false; de.fraunhofer.iosb.ilt.sta.query.expression.Expression filter = query.getFilter(); if (filter != null) { handler.addFilterToQuery(filter, sqlQuery); } if (settings.getAlwaysOrderbyId()) { sqlQuery.orderBy(mainTable.idPath.asc()); } if (needsDistinct && !distict) { sqlQuery.distinct(); } } return sqlQuery; } @Override public void visit(EntityPathElement element) { Long intId = null; Id id = element.getId(); if (id != null) { if (id.getBasicPersistenceType() == BasicPersistenceType.Integer) { intId = (Long) id.asBasicPersistenceType(); } else { throw new IllegalArgumentException("This implementation expects Long ids, not " + id.getBasicPersistenceType()); } } queryEntityType(element.getEntityType(), intId, lastPath); } @Override public void visit(EntitySetPathElement element) { queryEntityType(element.getEntityType(), null, lastPath); } @Override public void visit(PropertyPathElement element) { selectedProperties.add(element.getProperty()); selectedProperties.add(EntityProperty.Id); } @Override public void visit(CustomPropertyPathElement element) { // noting to do for custom properties. } @Override public void visit(CustomPropertyArrayIndex element) { // noting to do for custom properties. } public void queryEntityType(EntityType type, Long id, TableRef last) { switch (type) { case Datastream: queryDatastreams(id, last); break; case MultiDatastream: queryMultiDatastreams(id, last); break; case FeatureOfInterest: queryFeatures(id, last); break; case HistoricalLocation: queryHistLocations(id, last); break; case Location: queryLocations(id, last); break; case Observation: queryObservations(id, last); break; case ObservedProperty: queryObsProperties(id, last); break; case Sensor: querySensors(id, last); break; case Thing: queryThings(id, last); break; default: LOGGER.error("Unknown entity type {}!?", type); throw new IllegalStateException("Unknown entity type " + type); } if (mainTable == null && !last.isEmpty()) { mainTable = last.copy(); } } private void queryDatastreams(Long entityId, TableRef last) { int nr = ++aliasNr; String alias = ALIAS_PREFIX + nr; QDatastreams qDataStreams = new QDatastreams(alias); boolean added = true; if (last.type == null) { sqlQuery.select(PropertyHelper.getExpressions(qDataStreams, selectedProperties)); sqlQuery.from(qDataStreams); } else { switch (last.type) { case Thing: QThings qThings = (QThings) last.qPath; sqlQuery.innerJoin(qDataStreams).on(qDataStreams.thingId.eq(qThings.id)); needsDistinct = true; break; case Observation: QObservations qObservations = (QObservations) last.qPath; sqlQuery.innerJoin(qDataStreams).on(qDataStreams.id.eq(qObservations.datastreamId)); break; case Sensor: QSensors qSensors = (QSensors) last.qPath; sqlQuery.innerJoin(qDataStreams).on(qDataStreams.sensorId.eq(qSensors.id)); needsDistinct = true; break; case ObservedProperty: QObsProperties qObsProperties = (QObsProperties) last.qPath; sqlQuery.innerJoin(qDataStreams).on(qDataStreams.obsPropertyId.eq(qObsProperties.id)); needsDistinct = true; break; case Datastream: added = false; break; default: LOGGER.error("Do not know how to join {} onto Datastreams.", last.type); throw new IllegalStateException("Do not know how to join"); } } if (added) { last.type = EntityType.Datastream; last.qPath = qDataStreams; last.idPath = qDataStreams.id; } if (entityId != null) { sqlQuery.where(qDataStreams.id.eq(entityId)); } } private void queryMultiDatastreams(Long entityId, TableRef last) { int nr = ++aliasNr; String alias = ALIAS_PREFIX + nr; QMultiDatastreams qMultiDataStreams = new QMultiDatastreams(alias); boolean added = true; if (last.type == null) { sqlQuery.select(PropertyHelper.getExpressions(qMultiDataStreams, selectedProperties)); sqlQuery.from(qMultiDataStreams); } else { switch (last.type) { case Thing: QThings qThings = (QThings) last.qPath; sqlQuery.innerJoin(qMultiDataStreams).on(qMultiDataStreams.thingId.eq(qThings.id)); needsDistinct = true; break; case Observation: QObservations qObservations = (QObservations) last.qPath; sqlQuery.innerJoin(qMultiDataStreams).on(qMultiDataStreams.id.eq(qObservations.multiDatastreamId)); break; >>>>>>> public TableRef copy();
<<<<<<< ======= public static boolean drawTop = true; public static boolean drawBottom = true; public static boolean drawCorners = true; World world = mc.theWorld; >>>>>>> <<<<<<< float f = event.getPartialTicks(); ======= // float f = event.partialTicks; // I still dont know what this is for. >>>>>>> float f = event.getPartialTicks(); <<<<<<< Tessellator tessellator = Tessellator.getInstance(); VertexBuffer vertexBuffer = tessellator.getBuffer(); ======= Tessellator tessellator = Tessellator.getInstance(); VertexBuffer vertexBuffer = tessellator.getBuffer(); >>>>>>> Tessellator tessellator = Tessellator.getInstance(); VertexBuffer vertexBuffer = tessellator.getBuffer(); <<<<<<< int red = b.color[0], green = b.color[1], blue = b.color[2]; vertexBuffer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); tessellator.draw(); ======= int red = 255, green = 255, blue = 255; vertexBuffer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); tessellator.draw(); >>>>>>> int red = b.color[0], green = b.color[1], blue = b.color[2]; vertexBuffer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex(); vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex(); tessellator.draw();
<<<<<<< ======= import com.xiaoju.uemc.turbo.engine.exception.*; import com.xiaoju.uemc.turbo.engine.param.GetFlowModuleParam; import org.slf4j.LoggerFactory; import org.slf4j.Logger; >>>>>>>
<<<<<<< ======= import org.springframework.cloud.servicebroker.model.ServiceBrokerRequest; import org.springframework.cloud.servicebroker.model.binding.DeleteServiceInstanceBindingResponse; >>>>>>> import org.springframework.cloud.servicebroker.model.binding.DeleteServiceInstanceBindingResponse;
<<<<<<< if (preference.getTitle().toString().equals(getString(R.string.pref_advanced_options)) || preference.getTitle().toString().equals(getString(R.string.pref_about_title))) ======= if (preference.getTitle().toString().equals(getString(R.string.pref_advanced_options))) { >>>>>>> if (preference.getTitle().toString().equals(getString(R.string.pref_advanced_options)) || preference.getTitle().toString().equals(getString(R.string.pref_about_title))) {
<<<<<<< ======= private static String DEFAULT_CONTACTS_XML; >>>>>>> <<<<<<< try { USER_CONTACTS_XML = Platform.getInstanceLocation().getURL().getPath() + "contacts.xml"; IFileStore userContacts = EFS.getLocalFileSystem().fromLocalFile(new File(USER_CONTACTS_XML)); if(!userContacts.fetchInfo().exists()) { URL url = FileLocator.find(Platform.getBundle(KeyStorePlugin.PLUGIN_ID), new Path("contactstore/contacts.xml"), null); try { url = FileLocator.toFileURL(url); } catch (IOException e) { // LogUtil.logError(KeyStorePlugin.PLUGIN_ID, Messages.ContactManager_0, e, true); } IFileStore defaultContacts = EFS.getLocalFileSystem().fromLocalFile(new File(url.getPath())); defaultContacts.copy(userContacts, 0, null); } } catch (Exception e) { // LogUtil.logError(KeyStorePlugin.PLUGIN_ID, Messages.ContactManager_5, e, true); } ======= try { USER_CONTACTS_XML = Platform.getInstanceLocation().getURL().getPath() + "contacts.xml"; //$NON-NLS-1$ IFileStore userContacts = EFS.getStore(new URI("file://" + USER_CONTACTS_XML)); //$NON-NLS-1$ if (!userContacts.fetchInfo().exists()) { URL url = FileLocator.find(Platform.getBundle(KeyStorePlugin.PLUGIN_ID), new Path( "contactstore/contacts.xml"), null); //$NON-NLS-1$ try { DEFAULT_CONTACTS_XML = FileLocator.toFileURL(url).getPath(); } catch (IOException e) { LogUtil.logError(KeyStorePlugin.PLUGIN_ID, Messages.ContactManager_0, e, true); } IFileStore defaultContacts = EFS.getStore(new URI("file://" + DEFAULT_CONTACTS_XML)); //$NON-NLS-1$ defaultContacts.copy(userContacts, 0, null); } } catch (Exception e) { LogUtil.logError(KeyStorePlugin.PLUGIN_ID, Messages.ContactManager_5, e, true); } >>>>>>> try { USER_CONTACTS_XML = Platform.getInstanceLocation().getURL().getPath() + "contacts.xml"; IFileStore userContacts = EFS.getLocalFileSystem().fromLocalFile(new File(USER_CONTACTS_XML)); if(!userContacts.fetchInfo().exists()) { URL url = FileLocator.find(Platform.getBundle(KeyStorePlugin.PLUGIN_ID), new Path("contactstore/contacts.xml"), null); try { url = FileLocator.toFileURL(url); } catch (IOException e) { LogUtil.logError(KeyStorePlugin.PLUGIN_ID, Messages.ContactManager_0, e, true); } IFileStore defaultContacts = EFS.getLocalFileSystem().fromLocalFile(new File(url.getPath())); defaultContacts.copy(userContacts, 0, null); } } catch (Exception e) { LogUtil.logError(KeyStorePlugin.PLUGIN_ID, Messages.ContactManager_5, e, true); }
<<<<<<< List<Object[]> data = new ArrayList<>(); ======= List<Object[]> data = new ArrayList<Object[]>(); >>>>>>> List<Object[]> data = new ArrayList<>(); <<<<<<< List<Object[]> data = new ArrayList<>(); ======= List<Object[]> data = new ArrayList<Object[]>(); >>>>>>> List<Object[]> data = new ArrayList<>(); <<<<<<< Set<String> expectedNames = new HashSet<>(count); ======= Set<String> expectedNames = new HashSet<String>(count); >>>>>>> expectedNames = new HashSet<String>(count); Set<String> expectedNames = new HashSet<String>(count); Set<String> expectedNames = new HashSet<>(count);
<<<<<<< } ======= if (JavaVersion.JAVA_1_6.isCurrentOrHigher()) { // Hadoop requires Java 1.6 registerProtocol(FileProtocols.HDFS, new com.mucommander.commons.file.impl.hadoop.HDFSProtocolProvider()); //registerProtocol(FileProtocols.S3, new com.mucommander.commons.file.impl.hadoop.S3ProtocolProvider()); } registerProtocol(FileProtocols.S3, new com.mucommander.commons.file.impl.s3.S3ProtocolProvider()); registerProtocol(FileProtocols.WEBDAV, new com.mucommander.commons.file.impl.webdav.WebDAVProvider()); registerProtocol(FileProtocols.VSPHERE, new com.mucommander.commons.file.impl.vsphere.VSphereProtocolProvider()); >>>>>>> registerProtocol(FileProtocols.HDFS, new com.mucommander.commons.file.impl.hadoop.HDFSProtocolProvider()); //registerProtocol(FileProtocols.S3, new com.mucommander.commons.file.impl.hadoop.S3ProtocolProvider()); registerProtocol(FileProtocols.S3, new com.mucommander.commons.file.impl.s3.S3ProtocolProvider()); registerProtocol(FileProtocols.WEBDAV, new com.mucommander.commons.file.impl.webdav.WebDAVProvider()); registerProtocol(FileProtocols.VSPHERE, new com.mucommander.commons.file.impl.vsphere.VSphereProtocolProvider()); }
<<<<<<< Assert.assertEquals(1, queuedWork.size()); Assert.assertTrue(queuedWork.containsKey("cluster1")); Map<Table.ID,String> cluster1Work = queuedWork.get("cluster1"); Assert.assertEquals(1, cluster1Work.size()); Assert.assertTrue(cluster1Work.containsKey(target.getSourceTableId())); Assert.assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename1, target), ======= assertEquals(1, queuedWork.size()); assertTrue(queuedWork.containsKey("cluster1")); Map<String,String> cluster1Work = queuedWork.get("cluster1"); assertEquals(1, cluster1Work.size()); assertTrue(cluster1Work.containsKey(target.getSourceTableId())); assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename1, target), >>>>>>> assertEquals(1, queuedWork.size()); assertTrue(queuedWork.containsKey("cluster1")); Map<Table.ID,String> cluster1Work = queuedWork.get("cluster1"); assertEquals(1, cluster1Work.size()); assertTrue(cluster1Work.containsKey(target.getSourceTableId())); assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename1, target), <<<<<<< Map<Table.ID,String> cluster1Work = queuedWork.get("cluster1"); Assert.assertEquals(2, cluster1Work.size()); Assert.assertTrue(cluster1Work.containsKey(target1.getSourceTableId())); Assert.assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename1, target1), ======= Map<String,String> cluster1Work = queuedWork.get("cluster1"); assertEquals(2, cluster1Work.size()); assertTrue(cluster1Work.containsKey(target1.getSourceTableId())); assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename1, target1), >>>>>>> Map<Table.ID,String> cluster1Work = queuedWork.get("cluster1"); assertEquals(2, cluster1Work.size()); assertTrue(cluster1Work.containsKey(target1.getSourceTableId())); assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename1, target1), <<<<<<< Assert.assertEquals(1, queuedWork.size()); Assert.assertTrue(queuedWork.containsKey("cluster1")); Map<Table.ID,String> cluster1Work = queuedWork.get("cluster1"); Assert.assertEquals(1, cluster1Work.size()); Assert.assertTrue(cluster1Work.containsKey(target.getSourceTableId())); Assert.assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename2, target), ======= assertEquals(1, queuedWork.size()); assertTrue(queuedWork.containsKey("cluster1")); Map<String,String> cluster1Work = queuedWork.get("cluster1"); assertEquals(1, cluster1Work.size()); assertTrue(cluster1Work.containsKey(target.getSourceTableId())); assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename2, target), >>>>>>> assertEquals(1, queuedWork.size()); assertTrue(queuedWork.containsKey("cluster1")); Map<Table.ID,String> cluster1Work = queuedWork.get("cluster1"); assertEquals(1, cluster1Work.size()); assertTrue(cluster1Work.containsKey(target.getSourceTableId())); assertEquals(DistributedWorkQueueWorkAssignerHelper.getQueueKey(filename2, target),
<<<<<<< ======= import net.dries007.tfc.util.IBellowsConsumerBlock; import net.dries007.tfc.util.TFCSoundEvents; >>>>>>> import net.dries007.tfc.util.TFCSoundEvents;
<<<<<<< inventoryItemBlocks.add(new ItemBlockTFC(register(r, "wood/button/" + wood.getRegistryName().getPath(), new BlockButtonWoodTFC(wood), CT_DECORATIONS))); ======= inventoryItemBlocks.put(register(r, "wood/button/" + wood.getRegistryName().getPath(), new BlockButtonWoodTFC(wood), CT_DECORATIONS), ItemBlockTFC.class); toolRacks.add(register(r, "wood/tool_rack/" + wood.getRegistryName().getPath(), new BlockToolRack(wood, .5F, 3F), CT_DECORATIONS)); >>>>>>> inventoryItemBlocks.add(new ItemBlockTFC(register(r, "wood/button/" + wood.getRegistryName().getPath(), new BlockButtonWoodTFC(wood), CT_DECORATIONS))); toolRacks.add(register(r, "wood/tool_rack/" + wood.getRegistryName().getPath(), new BlockToolRack(wood, .5F, 3F), CT_DECORATIONS)); <<<<<<< allTrapDoorWoodBlocks.forEach(x -> inventoryItemBlocks.add(new ItemBlockTFC(x))); allChestBlocks.forEach(x -> normalItemBlocks.add(new ItemBlockTFC(x))); ======= allTrapDoorWoodBlocks.forEach(x -> inventoryItemBlocks.put(x, ItemBlockTFC.class)); allChestBlocks.forEach(x -> normalItemBlocks.put(x, ItemBlockTFC.class)); allToolRackBlocks.forEach(x -> normalItemBlocks.put(x, ItemBlockTFC.class)); >>>>>>> allTrapDoorWoodBlocks.forEach(x -> inventoryItemBlocks.add(new ItemBlockTFC(x))); allChestBlocks.forEach(x -> normalItemBlocks.add(new ItemBlockTFC(x))); allToolRackBlocks.forEach(x -> normalItemBlocks.add(new ItemBlockTFC(x))); <<<<<<< register(TESaplingTFC.class, "sapling"); register(TEChestTFC.class, "chest"); register(TEWorldItem.class, "world_item"); register(TETorchTFC.class, "torch"); register(TEPitKiln.class, "pit_kiln"); register(TELogPile.class, "log_pile"); register(TEIngotPile.class, "ingot_pile"); register(TEFirePit.class, "fire_pit"); ======= TileEntity.register(TESaplingTFC.ID.toString(), TESaplingTFC.class); TileEntity.register(TEChestTFC.ID.toString(), TEChestTFC.class); TileEntity.register(TEWorldItem.ID.toString(), TEWorldItem.class); TileEntity.register(TETorchTFC.ID.toString(), TETorchTFC.class); TileEntity.register(TEPitKiln.ID.toString(), TEPitKiln.class); TileEntity.register(TELogPile.ID.toString(), TELogPile.class); TileEntity.register(TEIngotPile.ID.toString(), TEIngotPile.class); TileEntity.register(TEToolRack.ID.toString(), TEToolRack.class); >>>>>>> register(TESaplingTFC.class, "sapling"); register(TEChestTFC.class, "chest"); register(TEWorldItem.class, "world_item"); register(TETorchTFC.class, "torch"); register(TEPitKiln.class, "pit_kiln"); register(TELogPile.class, "log_pile"); register(TEIngotPile.class, "ingot_pile"); register(TEFirePit.class, "fire_pit"); register(TEToolRack.class, "tool_rack");
<<<<<<< ======= this.setDefaultState(this.blockState.getBaseState().withProperty(GROWTHSTAGE, CalendarTFC.Month.MARCH.id()).withProperty(DOWN, false).withProperty(UP, false).withProperty(NORTH, false).withProperty(EAST, false).withProperty(SOUTH, false).withProperty(WEST, false)); } public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing facing) { IBlockState iblockstate = worldIn.getBlockState(pos); BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, facing); Block block = iblockstate.getBlock(); return blockfaceshape == BlockFaceShape.SOLID || block instanceof BlockFence; } @Override public int getMetaFromState(IBlockState state) { return 0; >>>>>>> <<<<<<< return state.withProperty(GROWTHSTAGE, plant.getStages()[CalenderTFC.getMonthOfYear().id()]) ======= return state.withProperty(GROWTHSTAGE, CalendarTFC.getMonthOfYear().id()) >>>>>>> return state.withProperty(GROWTHSTAGE, plant.getStages()[CalendarTFC.getMonthOfYear().id()]) <<<<<<< return state.withProperty(GROWTHSTAGE, plant.getStages()[CalenderTFC.getMonthOfYear().id()]).withProperty(NORTH, state.getValue(SOUTH)).withProperty(EAST, state.getValue(WEST)).withProperty(SOUTH, state.getValue(NORTH)).withProperty(WEST, state.getValue(EAST)); ======= return state.withProperty(GROWTHSTAGE, CalendarTFC.getMonthOfYear().id()).withProperty(NORTH, state.getValue(SOUTH)).withProperty(EAST, state.getValue(WEST)).withProperty(SOUTH, state.getValue(NORTH)).withProperty(WEST, state.getValue(EAST)); >>>>>>> return state.withProperty(GROWTHSTAGE, plant.getStages()[CalendarTFC.getMonthOfYear().id()]).withProperty(NORTH, state.getValue(SOUTH)).withProperty(EAST, state.getValue(WEST)).withProperty(SOUTH, state.getValue(NORTH)).withProperty(WEST, state.getValue(EAST)); <<<<<<< return state.withProperty(GROWTHSTAGE, plant.getStages()[CalenderTFC.getMonthOfYear().id()]).withProperty(NORTH, state.getValue(EAST)).withProperty(EAST, state.getValue(SOUTH)).withProperty(SOUTH, state.getValue(WEST)).withProperty(WEST, state.getValue(NORTH)); ======= return state.withProperty(GROWTHSTAGE, CalendarTFC.getMonthOfYear().id()).withProperty(NORTH, state.getValue(EAST)).withProperty(EAST, state.getValue(SOUTH)).withProperty(SOUTH, state.getValue(WEST)).withProperty(WEST, state.getValue(NORTH)); >>>>>>> return state.withProperty(GROWTHSTAGE, plant.getStages()[CalendarTFC.getMonthOfYear().id()]).withProperty(NORTH, state.getValue(EAST)).withProperty(EAST, state.getValue(SOUTH)).withProperty(SOUTH, state.getValue(WEST)).withProperty(WEST, state.getValue(NORTH)); <<<<<<< return state.withProperty(GROWTHSTAGE, plant.getStages()[CalenderTFC.getMonthOfYear().id()]).withProperty(NORTH, state.getValue(SOUTH)).withProperty(SOUTH, state.getValue(NORTH)); ======= return state.withProperty(GROWTHSTAGE, CalendarTFC.getMonthOfYear().id()).withProperty(NORTH, state.getValue(SOUTH)).withProperty(SOUTH, state.getValue(NORTH)); >>>>>>> return state.withProperty(GROWTHSTAGE, plant.getStages()[CalendarTFC.getMonthOfYear().id()]).withProperty(NORTH, state.getValue(SOUTH)).withProperty(SOUTH, state.getValue(NORTH)); <<<<<<< return state.withProperty(GROWTHSTAGE, plant.getStages()[CalenderTFC.getMonthOfYear().id()]).withProperty(EAST, state.getValue(WEST)).withProperty(WEST, state.getValue(EAST)); ======= return state.withProperty(GROWTHSTAGE, CalendarTFC.getMonthOfYear().id()).withProperty(EAST, state.getValue(WEST)).withProperty(WEST, state.getValue(EAST)); >>>>>>> return state.withProperty(GROWTHSTAGE, plant.getStages()[CalendarTFC.getMonthOfYear().id()]).withProperty(EAST, state.getValue(WEST)).withProperty(WEST, state.getValue(EAST));
<<<<<<< import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; ======= >>>>>>> import net.minecraft.entity.EntityLivingBase; <<<<<<< import net.dries007.tfc.objects.entity.animal.IAnimalTFC; import net.dries007.tfc.objects.potioneffects.PotionEffectsTFC; ======= >>>>>>> import net.dries007.tfc.objects.potioneffects.PotionEffectsTFC;
<<<<<<< import net.dries007.tfc.api.capability.heat.CapabilityItemHeat; import net.dries007.tfc.api.capability.size.CapabilityItemSize; ======= import net.dries007.tfc.api.util.TFCConstants; >>>>>>> import net.dries007.tfc.api.util.TFCConstants; import net.dries007.tfc.api.capability.heat.CapabilityItemHeat; import net.dries007.tfc.api.capability.size.CapabilityItemSize;
<<<<<<< @SuppressWarnings("ConstantConditions") ======= public boolean isValidFloatingWaterDepth(World world, BlockPos pos, IBlockState water) { int depthCounter = getMinWaterDepth(); int maxDepth = getMaxWaterDepth(); for (int i = 1; i <= depthCounter; ++i) { if (world.getBlockState(pos.down(i)) != water) return false; } while (world.getBlockState(pos.down(depthCounter)) == water) { depthCounter++; } return (maxDepth > 0) ? depthCounter <= maxDepth + 1 : false; } public int getMinWaterDepth() { return minWaterDepth; } public int getMaxWaterDepth() { return maxWaterDepth; } >>>>>>> public boolean isValidFloatingWaterDepth(World world, BlockPos pos, IBlockState water) { int depthCounter = getMinWaterDepth(); int maxDepth = getMaxWaterDepth(); for (int i = 1; i <= depthCounter; ++i) { if (world.getBlockState(pos.down(i)) != water) return false; } while (world.getBlockState(pos.down(depthCounter)) == water) { depthCounter++; } return (maxDepth > 0) ? depthCounter <= maxDepth + 1 : false; } public int getMinWaterDepth() { return minWaterDepth; } public int getMaxWaterDepth() { return maxWaterDepth; } @SuppressWarnings("ConstantConditions")
<<<<<<< private long intoxicatedTime; ======= private boolean hasBook; >>>>>>> private long intoxicatedTime; private boolean hasBook; <<<<<<< harvestingTool = ItemStack.EMPTY; intoxicatedTime = 0; ======= this.harvestingTool = ItemStack.EMPTY; this.hasBook = false; >>>>>>> this.harvestingTool = ItemStack.EMPTY; this.hasBook = false; this.intoxicatedTime = 0; <<<<<<< nbt.setLong("intoxicatedTime", intoxicatedTime); ======= nbt.setBoolean("hasBook", hasBook); >>>>>>> nbt.setBoolean("hasBook", hasBook); nbt.setLong("intoxicatedTime", intoxicatedTime); <<<<<<< intoxicatedTime = nbt.getLong("intoxicatedTime"); ======= hasBook = nbt.getBoolean("hasBook"); >>>>>>> hasBook = nbt.getBoolean("hasBook"); intoxicatedTime = nbt.getLong("intoxicatedTime"); <<<<<<< public void addIntoxicatedTime(long ticks) { long currentTicks = CalendarTFC.PLAYER_TIME.getTicks(); if (this.intoxicatedTime < currentTicks) { this.intoxicatedTime = currentTicks; } this.intoxicatedTime += ticks; if (this.intoxicatedTime > currentTicks + MAX_INTOXICATED_TICKS) { this.intoxicatedTime = currentTicks + MAX_INTOXICATED_TICKS; } } @Override public long getIntoxicatedTime() { return Math.max(0, intoxicatedTime - CalendarTFC.PLAYER_TIME.getTicks()); } @Override ======= public boolean hasBook() { return this.hasBook; } @Override public void setHasBook(boolean value) { this.hasBook = value; } @Override >>>>>>> public boolean hasBook() { return this.hasBook; } @Override public void setHasBook(boolean value) { this.hasBook = value; } @Override public void addIntoxicatedTime(long ticks) { long currentTicks = CalendarTFC.PLAYER_TIME.getTicks(); if (this.intoxicatedTime < currentTicks) { this.intoxicatedTime = currentTicks; } this.intoxicatedTime += ticks; if (this.intoxicatedTime > currentTicks + MAX_INTOXICATED_TICKS) { this.intoxicatedTime = currentTicks + MAX_INTOXICATED_TICKS; } } @Override public long getIntoxicatedTime() { return Math.max(0, intoxicatedTime - CalendarTFC.PLAYER_TIME.getTicks()); } @Override
<<<<<<< @Config.Comment("If true, lava and water will make vanilla stone + cobblestone (instead of TFC rock variants).") @Config.LangKey("config." + MOD_ID + ".general.disableLavaWaterPlacesTFCBlocks") public boolean disableLavaWaterPlacesTFCBlocks = false; ======= @Config.Comment({"Disable the override torches use.", "Only use if you want vanilla torches or have another mod that changes torches."}) @Config.LangKey("config." + MOD_ID + ".general.disableTorchOverride") public boolean disableTorchOverride = false; @Config.Comment({"Disable trees being fully cut by axes.", "Only use if you want other mods to handle tree felling."}) @Config.LangKey("config." + MOD_ID + ".general.disableTreeFelling") public boolean disableTreeFelling = false; >>>>>>> @Config.Comment("If true, lava and water will make vanilla stone + cobblestone (instead of TFC rock variants).") @Config.LangKey("config." + MOD_ID + ".general.disableLavaWaterPlacesTFCBlocks") public boolean disableLavaWaterPlacesTFCBlocks = false; @Config.Comment({"Disable the override torches use.", "Only use if you want vanilla torches or have another mod that changes torches."}) @Config.LangKey("config." + MOD_ID + ".general.disableTorchOverride") public boolean disableTorchOverride = false; @Config.Comment({"Disable trees being fully cut by axes.", "Only use if you want other mods to handle tree felling."}) @Config.LangKey("config." + MOD_ID + ".general.disableTreeFelling") public boolean disableTreeFelling = false;
<<<<<<< import net.dries007.tfc.util.OreDictionaryHelper; import net.dries007.tfc.world.classic.CalenderTFC; ======= import net.dries007.tfc.world.classic.CalendarTFC; >>>>>>> import net.dries007.tfc.util.OreDictionaryHelper; import net.dries007.tfc.world.classic.CalendarTFC; <<<<<<< blockState = this.createPlantBlockState(); this.setDefaultState(this.blockState.getBaseState()); ======= this.setDefaultState(this.blockState.getBaseState().withProperty(GROWTHSTAGE, CalendarTFC.Month.MARCH.id())); } public int getCurrentTime(World world) { return Math.floorDiv(Math.toIntExact(world.getWorldTime() % 24000), 6000); >>>>>>> blockState = this.createPlantBlockState(); this.setDefaultState(this.blockState.getBaseState()); <<<<<<< return this.getDefaultState().withProperty(DAYPERIOD, getDayPeriod()).withProperty(AGE, meta).withProperty(GROWTHSTAGE, plant.getStages()[CalenderTFC.Month.MARCH.id()]); ======= return this.getDefaultState().withProperty(GROWTHSTAGE, CalendarTFC.getMonthOfYear().id()); >>>>>>> return this.getDefaultState().withProperty(DAYPERIOD, getDayPeriod()).withProperty(AGE, meta).withProperty(GROWTHSTAGE, plant.getStages()[CalendarTFC.Month.MARCH.id()]); <<<<<<< return state.withProperty(DAYPERIOD, getDayPeriod()).withProperty(GROWTHSTAGE, plant.getStages()[CalenderTFC.getMonthOfYear().id()]); ======= return state.withProperty(GROWTHSTAGE, CalendarTFC.getMonthOfYear().id()); >>>>>>> return state.withProperty(DAYPERIOD, getDayPeriod()).withProperty(GROWTHSTAGE, plant.getStages()[CalendarTFC.getMonthOfYear().id()]); <<<<<<< int expectedStage = plant.getStages()[currentMonth.id()]; ======= int expectedStage = CalendarTFC.getMonthOfYear().id(); >>>>>>> int expectedStage = plant.getStages()[currentMonth.id()]; <<<<<<< world.setBlockState(pos, state.withProperty(DAYPERIOD, getDayPeriod()).withProperty(GROWTHSTAGE, plant.getStages()[CalenderTFC.getMonthOfYear().id()])); checkAndDropBlock(world, pos, state); ======= world.setBlockState(pos, state.withProperty(DAYPERIOD, getCurrentTime(world)).withProperty(GROWTHSTAGE, CalendarTFC.getMonthOfYear().id())); this.checkAndDropBlock(world, pos, state); >>>>>>> world.setBlockState(pos, state.withProperty(DAYPERIOD, getDayPeriod()).withProperty(GROWTHSTAGE, plant.getStages()[CalendarTFC.getMonthOfYear().id()])); checkAndDropBlock(world, pos, state);
<<<<<<< import net.dries007.tfc.client.gui.GuiBarrel; import net.dries007.tfc.client.gui.GuiContainerTFC; import net.dries007.tfc.client.gui.GuiLiquidTransfer; import net.dries007.tfc.objects.blocks.BlocksTFC; import net.dries007.tfc.objects.container.*; ======= import net.dries007.tfc.api.recipes.KnappingRecipe; import net.dries007.tfc.api.types.Rock; import net.dries007.tfc.api.util.IRockObject; import net.dries007.tfc.client.gui.*; import net.dries007.tfc.objects.container.*; >>>>>>> import net.dries007.tfc.client.gui.GuiBarrel; import net.dries007.tfc.client.gui.GuiContainerTFC; import net.dries007.tfc.client.gui.GuiLiquidTransfer; import net.dries007.tfc.objects.blocks.BlocksTFC; import net.dries007.tfc.api.recipes.KnappingRecipe; import net.dries007.tfc.api.types.Rock; import net.dries007.tfc.api.util.IRockObject; import net.dries007.tfc.client.gui.*; import net.dries007.tfc.objects.container.*; <<<<<<< import net.dries007.tfc.objects.te.TEBarrel; import net.dries007.tfc.objects.te.TEFirePit; import net.dries007.tfc.objects.te.TELogPile; ======= import net.dries007.tfc.objects.items.rock.ItemRock; import net.dries007.tfc.objects.te.*; >>>>>>> import net.dries007.tfc.objects.items.rock.ItemRock; import net.dries007.tfc.objects.te.*; <<<<<<< TEFirePit teFirePit = Helpers.getTE(world, pos, TEFirePit.class); return new ContainerFirePit(player.inventory, teFirePit); case BARREL: return new ContainerBarrel(player.inventory, Helpers.getTE(world, pos, TEBarrel.class)); ======= return new ContainerFirePit(player.inventory, Helpers.getTE(world, pos, TEFirePit.class)); case CHARCOAL_FORGE: return new ContainerCharcoalForge(player.inventory, Helpers.getTE(world, pos, TECharcoalForge.class)); case ANVIL: return new ContainerAnvilTFC(player.inventory, Helpers.getTE(world, pos, TEAnvilTFC.class)); case ANVIL_PLAN: return new ContainerAnvilPlan(player.inventory, Helpers.getTE(world, pos, TEAnvilTFC.class)); case KNAPPING_STONE: return new ContainerKnapping(KnappingRecipe.Type.STONE, player.inventory, stack.getItem() instanceof ItemRock ? stack : player.getHeldItemOffhand()); case KNAPPING_CLAY: return new ContainerKnapping(KnappingRecipe.Type.CLAY, player.inventory, stack.getItem() == Items.CLAY_BALL ? stack : player.getHeldItemOffhand()); case KNAPPING_LEATHER: return new ContainerKnapping(KnappingRecipe.Type.LEATHER, player.inventory, stack.getItem() == ItemsTFC.LEATHER ? stack : player.getHeldItemOffhand()); case KNAPPING_FIRE_CLAY: return new ContainerKnapping(KnappingRecipe.Type.FIRE_CLAY, player.inventory, stack.getItem() == ItemsTFC.FIRE_CLAY ? stack : player.getHeldItemOffhand()); case CRUCIBLE: return new ContainerCrucible(player.inventory, Helpers.getTE(world, pos, TECrucible.class)); >>>>>>> return new ContainerFirePit(player.inventory, Helpers.getTE(world, pos, TEFirePit.class)); case BARREL: return new ContainerBarrel(player.inventory, Helpers.getTE(world, pos, TEBarrel.class)); case CHARCOAL_FORGE: return new ContainerCharcoalForge(player.inventory, Helpers.getTE(world, pos, TECharcoalForge.class)); case ANVIL: return new ContainerAnvilTFC(player.inventory, Helpers.getTE(world, pos, TEAnvilTFC.class)); case ANVIL_PLAN: return new ContainerAnvilPlan(player.inventory, Helpers.getTE(world, pos, TEAnvilTFC.class)); case KNAPPING_STONE: return new ContainerKnapping(KnappingRecipe.Type.STONE, player.inventory, stack.getItem() instanceof ItemRock ? stack : player.getHeldItemOffhand()); case KNAPPING_CLAY: return new ContainerKnapping(KnappingRecipe.Type.CLAY, player.inventory, stack.getItem() == Items.CLAY_BALL ? stack : player.getHeldItemOffhand()); case KNAPPING_LEATHER: return new ContainerKnapping(KnappingRecipe.Type.LEATHER, player.inventory, stack.getItem() == ItemsTFC.LEATHER ? stack : player.getHeldItemOffhand()); case KNAPPING_FIRE_CLAY: return new ContainerKnapping(KnappingRecipe.Type.FIRE_CLAY, player.inventory, stack.getItem() == ItemsTFC.FIRE_CLAY ? stack : player.getHeldItemOffhand()); case CRUCIBLE: return new ContainerCrucible(player.inventory, Helpers.getTE(world, pos, TECrucible.class)); <<<<<<< return new GuiContainerTFC(container, player.inventory, FIRE_PIT_BACKGROUND, BlocksTFC.FIREPIT.getTranslationKey()); case BARREL: return new GuiBarrel(container, player.inventory, world.getBlockState(new BlockPos(x, y, z)).getBlock().getTranslationKey()); ======= return new GuiFirePit(container, player.inventory, Helpers.getTE(world, pos, TEFirePit.class)); case CHARCOAL_FORGE: return new GuiCharcoalForge(container, player.inventory, Helpers.getTE(world, pos, TECharcoalForge.class)); case ANVIL: return new GuiAnvilTFC(container, player.inventory, Helpers.getTE(world, pos, TEAnvilTFC.class)); case ANVIL_PLAN: return new GuiAnvilPlan(container, player.inventory, Helpers.getTE(world, pos, TEAnvilTFC.class)); case KNAPPING_STONE: ItemStack stack = player.getHeldItemMainhand(); Rock rock = stack.getItem() instanceof IRockObject ? ((IRockObject) stack.getItem()).getRock(stack) : ((IRockObject) player.getHeldItemOffhand().getItem()).getRock(player.getHeldItemOffhand()); return new GuiKnapping(container, player, KnappingRecipe.Type.STONE, rock.getTexture()); case KNAPPING_CLAY: return new GuiKnapping(container, player, KnappingRecipe.Type.CLAY, CLAY_TEXTURE); case KNAPPING_LEATHER: return new GuiKnapping(container, player, KnappingRecipe.Type.LEATHER, LEATHER_TEXTURE); case KNAPPING_FIRE_CLAY: return new GuiKnapping(container, player, KnappingRecipe.Type.FIRE_CLAY, FIRE_CLAY_TEXTURE); case CRUCIBLE: return new GuiCrucible(container, player.inventory, Helpers.getTE(world, pos, TECrucible.class)); >>>>>>> return new GuiFirePit(container, player.inventory, Helpers.getTE(world, pos, TEFirePit.class)); case BARREL: return new GuiBarrel(container, player.inventory, world.getBlockState(new BlockPos(x, y, z)).getBlock().getTranslationKey()); case CHARCOAL_FORGE: return new GuiCharcoalForge(container, player.inventory, Helpers.getTE(world, pos, TECharcoalForge.class)); case ANVIL: return new GuiAnvilTFC(container, player.inventory, Helpers.getTE(world, pos, TEAnvilTFC.class)); case ANVIL_PLAN: return new GuiAnvilPlan(container, player.inventory, Helpers.getTE(world, pos, TEAnvilTFC.class)); case KNAPPING_STONE: ItemStack stack = player.getHeldItemMainhand(); Rock rock = stack.getItem() instanceof IRockObject ? ((IRockObject) stack.getItem()).getRock(stack) : ((IRockObject) player.getHeldItemOffhand().getItem()).getRock(player.getHeldItemOffhand()); return new GuiKnapping(container, player, KnappingRecipe.Type.STONE, rock.getTexture()); case KNAPPING_CLAY: return new GuiKnapping(container, player, KnappingRecipe.Type.CLAY, CLAY_TEXTURE); case KNAPPING_LEATHER: return new GuiKnapping(container, player, KnappingRecipe.Type.LEATHER, LEATHER_TEXTURE); case KNAPPING_FIRE_CLAY: return new GuiKnapping(container, player, KnappingRecipe.Type.FIRE_CLAY, FIRE_CLAY_TEXTURE); case CRUCIBLE: return new GuiCrucible(container, player.inventory, Helpers.getTE(world, pos, TECrucible.class)); <<<<<<< BARREL, ======= KNAPPING_STONE, KNAPPING_CLAY, KNAPPING_FIRE_CLAY, KNAPPING_LEATHER, CHARCOAL_FORGE, ANVIL, ANVIL_PLAN, CRUCIBLE, >>>>>>> BARREL, KNAPPING_STONE, KNAPPING_CLAY, KNAPPING_FIRE_CLAY, KNAPPING_LEATHER, CHARCOAL_FORGE, ANVIL, ANVIL_PLAN, CRUCIBLE,
<<<<<<< //leather quiver simpleItems.add(register(r, "quiver", new ItemQuiver(), CT_MISC)); simpleItems.add(register(r, "animal/product/wool", new ItemMisc(Size.TINY, Weight.LIGHT), CT_MISC)); simpleItems.add(register(r, "animal/product/wool_yarn", new ItemMisc(Size.TINY, Weight.LIGHT, "string"), CT_MISC)); simpleItems.add(register(r, "animal/product/wool_cloth", new ItemMisc(Size.TINY, Weight.LIGHT, "cloth_high_quality"), CT_MISC)); simpleItems.add(register(r, "animal/product/silk_cloth", new ItemMisc(Size.TINY, Weight.LIGHT, "cloth_high_quality"), CT_MISC)); ======= simpleItems.add(register(r, "animal/product/wool", new ItemMisc(Size.SMALL, Weight.LIGHT), CT_MISC)); simpleItems.add(register(r, "animal/product/wool_yarn", new ItemMisc(Size.VERY_SMALL, Weight.VERY_LIGHT, "string"), CT_MISC)); simpleItems.add(register(r, "animal/product/wool_cloth", new ItemMisc(Size.SMALL, Weight.LIGHT, "cloth_high_quality"), CT_MISC)); simpleItems.add(register(r, "animal/product/silk_cloth", new ItemMisc(Size.SMALL, Weight.LIGHT, "cloth_high_quality"), CT_MISC)); >>>>>>> //leather quiver simpleItems.add(register(r, "quiver", new ItemQuiver(), CT_MISC)); simpleItems.add(register(r, "animal/product/wool", new ItemMisc(Size.SMALL, Weight.LIGHT), CT_MISC)); simpleItems.add(register(r, "animal/product/wool_yarn", new ItemMisc(Size.VERY_SMALL, Weight.VERY_LIGHT, "string"), CT_MISC)); simpleItems.add(register(r, "animal/product/wool_cloth", new ItemMisc(Size.SMALL, Weight.LIGHT, "cloth_high_quality"), CT_MISC)); simpleItems.add(register(r, "animal/product/silk_cloth", new ItemMisc(Size.SMALL, Weight.LIGHT, "cloth_high_quality"), CT_MISC));
<<<<<<< private static final IWorldGenerator LOOSE_ROCKS_GEN = new WorldGenLooseRocks(true); private static final IWorldGenerator SNOW_ICE_GEN = new WorldGenSnowIce(); ======= private static final IWorldGenerator LOOSE_ROCKS_GEN = new WorldGenLooseRocks(); private static final IWorldGenerator STALACTITE_GEN = new WorldGenSpikes(true, 300); private static final IWorldGenerator STALAGMITE_GEN = new WorldGenSpikes(false, 300); private static final IWorldGenerator WATERFALL_GEN = new WorldGenFalls(FRESH_WATER, 50); private static final IWorldGenerator LAVAFALL_GEN = new WorldGenFalls(Blocks.FLOWING_LAVA.getDefaultState(), 15); //Todo change this if TFC implements it's own lava. Using static lava here makes the falls static >>>>>>> private static final IWorldGenerator LOOSE_ROCKS_GEN = new WorldGenLooseRocks(true); private static final IWorldGenerator STALACTITE_GEN = new WorldGenSpikes(true, 300); private static final IWorldGenerator STALAGMITE_GEN = new WorldGenSpikes(false, 300); private static final IWorldGenerator WATERFALL_GEN = new WorldGenFalls(FRESH_WATER, 50); private static final IWorldGenerator LAVAFALL_GEN = new WorldGenFalls(Blocks.FLOWING_LAVA.getDefaultState(), 15); //Todo change this if TFC implements it's own lava. Using static lava here makes the falls static private static final IWorldGenerator SNOW_ICE_GEN = new WorldGenSnowIce(); <<<<<<< SNOW_ICE_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); ======= WATERFALL_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); LAVAFALL_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); STALACTITE_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); STALAGMITE_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); >>>>>>> WATERFALL_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); LAVAFALL_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); STALACTITE_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); STALAGMITE_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider()); SNOW_ICE_GEN.generate(rand, chunkX, chunkZ, world, this, world.getChunkProvider());
<<<<<<< /** * Makes the player intoxicated * * @param ticks Ticks for the player to be intoxicated */ void addIntoxicatedTime(long ticks); /** * Gets the number of ticks the player is intoxicated for */ long getIntoxicatedTime(); ======= /** * If the player has been given the guide book */ boolean hasBook(); /** * Sets if the player has been given the guide book */ void setHasBook(boolean value); >>>>>>> /** * Makes the player intoxicated * * @param ticks Ticks for the player to be intoxicated */ void addIntoxicatedTime(long ticks); /** * Gets the number of ticks the player is intoxicated for */ long getIntoxicatedTime(); /** * If the player has been given the guide book */ boolean hasBook(); /** * Sets if the player has been given the guide book */ void setHasBook(boolean value);
<<<<<<< import net.dries007.tfc.api.capability.skill.CapabilityPlayerSkills; import net.dries007.tfc.api.capability.skill.PlayerSkillsHandler; ======= import net.dries007.tfc.api.capability.size.Size; import net.dries007.tfc.api.capability.size.Weight; >>>>>>> import net.dries007.tfc.api.capability.skill.CapabilityPlayerSkills; import net.dries007.tfc.api.capability.skill.PlayerSkillsHandler; import net.dries007.tfc.api.capability.size.Size; import net.dries007.tfc.api.capability.size.Weight;
<<<<<<< import net.dries007.tfc.objects.*; ======= import net.dries007.tfc.api.types.Ore; import net.dries007.tfc.api.types.Rock; import net.dries007.tfc.api.types.Tree; import net.dries007.tfc.objects.Metal; >>>>>>> import net.dries007.tfc.objects.*; import net.dries007.tfc.api.types.Ore; import net.dries007.tfc.api.types.Rock; import net.dries007.tfc.api.types.Tree; import net.dries007.tfc.objects.Metal;
<<<<<<< new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.BARLEY_FLOUR)), new FluidStack(FluidsTFC.BEER.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("beer"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of("apple"), new FluidStack(FluidsTFC.CIDER.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("cider"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of("sugar"), new FluidStack(FluidsTFC.RUM.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("rum"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.RICE_FLOUR)), new FluidStack(FluidsTFC.SAKE.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("sake"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.POTATO)), new FluidStack(FluidsTFC.VODKA.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("vodka"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.WHEAT_FLOUR)), new FluidStack(FluidsTFC.WHISKEY.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("whiskey"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.CORNMEAL_FLOUR)), new FluidStack(FluidsTFC.CORN_WHISKEY.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("corn_whiskey"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.RYE_FLOUR)), new FluidStack(FluidsTFC.RYE_WHISKEY.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("rye_whiskey"), ======= new BarrelRecipe(IIngredient.of(FRESH_WATER, 500), IIngredient.of(ItemFoodTFC.get(Food.BARLEY_FLOUR)), new FluidStack(FluidsTFC.BEER, 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("beer"), new BarrelRecipe(IIngredient.of(FRESH_WATER, 500), IIngredient.of("apple"), new FluidStack(FluidsTFC.CIDER, 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("cider"), new BarrelRecipe(IIngredient.of(FRESH_WATER, 500), IIngredient.of(Items.SUGAR), new FluidStack(FluidsTFC.RUM, 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("rum"), new BarrelRecipe(IIngredient.of(FRESH_WATER, 500), IIngredient.of(ItemFoodTFC.get(Food.RICE_FLOUR)), new FluidStack(FluidsTFC.SAKE, 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("sake"), new BarrelRecipe(IIngredient.of(FRESH_WATER, 500), IIngredient.of(ItemFoodTFC.get(Food.POTATO)), new FluidStack(FluidsTFC.VODKA, 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("vodka"), new BarrelRecipe(IIngredient.of(FRESH_WATER, 500), IIngredient.of(ItemFoodTFC.get(Food.WHEAT_FLOUR)), new FluidStack(FluidsTFC.WHISKEY, 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("whiskey"), new BarrelRecipe(IIngredient.of(FRESH_WATER, 500), IIngredient.of(ItemFoodTFC.get(Food.CORNMEAL_FLOUR)), new FluidStack(FluidsTFC.CORN_WHISKEY, 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("corn_whiskey"), new BarrelRecipe(IIngredient.of(FRESH_WATER, 500), IIngredient.of(ItemFoodTFC.get(Food.RYE_FLOUR)), new FluidStack(FluidsTFC.RYE_WHISKEY, 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("rye_whiskey"), >>>>>>> new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.BARLEY_FLOUR)), new FluidStack(FluidsTFC.BEER.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("beer"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of("apple"), new FluidStack(FluidsTFC.CIDER.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("cider"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(Items.SUGAR), new FluidStack(FluidsTFC.RUM.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("rum"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.RICE_FLOUR)), new FluidStack(FluidsTFC.SAKE.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("sake"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.POTATO)), new FluidStack(FluidsTFC.VODKA.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("vodka"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.WHEAT_FLOUR)), new FluidStack(FluidsTFC.WHISKEY.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("whiskey"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.CORNMEAL_FLOUR)), new FluidStack(FluidsTFC.CORN_WHISKEY.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("corn_whiskey"), new BarrelRecipe(IIngredient.of(FRESH_WATER.get(), 500), IIngredient.of(ItemFoodTFC.get(Food.RYE_FLOUR)), new FluidStack(FluidsTFC.RYE_WHISKEY.get(), 500), ItemStack.EMPTY, 72 * ICalendar.TICKS_IN_HOUR).setRegistryName("rye_whiskey"),
<<<<<<< /** * In 1.14+, every line in here needs to be a json file. Yay, but also ugh. */ ======= @SuppressWarnings("unused") >>>>>>> /** * In 1.14+, every line in here needs to be a json file. Yay, but also ugh. */ @SuppressWarnings("unused")
<<<<<<< import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.partition.PartitionManagementProvider; ======= import ca.uhn.fhir.jpa.partition.PartitionManagementProvider; >>>>>>> import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.partition.PartitionManagementProvider; <<<<<<< import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory; ======= import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor; import ca.uhn.fhir.rest.server.tenant.UrlBaseTenantIdentificationStrategy; >>>>>>> import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory; import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor; import ca.uhn.fhir.rest.server.tenant.UrlBaseTenantIdentificationStrategy; <<<<<<< if (HapiProperties.getPartitioningEnabled()) { PartitionSettings partitionSettings = appCtx.getBean(PartitionSettings.class); partitionSettings.setPartitioningEnabled(true); PartitionSettings.CrossPartitionReferenceMode mode = PartitionSettings.CrossPartitionReferenceMode.valueOf(HapiProperties.getPartitioningCrossPartitionReferenceMode()); partitionSettings.setAllowReferencesAcrossPartitions(mode); partitionSettings.setIncludePartitionInSearchHashes(HapiProperties.getIncludePartitionInSearchHashes()); registerProvider(appCtx.getBean(PartitionManagementProvider.class)); } ======= // Partitioning if (HapiProperties.getPartitioningMultitenancyEnabled()) { registerInterceptor(new RequestTenantPartitionInterceptor()); setTenantIdentificationStrategy(new UrlBaseTenantIdentificationStrategy()); registerProviders(appCtx.getBean(PartitionManagementProvider.class)); } >>>>>>> if (HapiProperties.getPartitioningEnabled()) { PartitionSettings partitionSettings = appCtx.getBean(PartitionSettings.class); partitionSettings.setPartitioningEnabled(true); PartitionSettings.CrossPartitionReferenceMode mode = PartitionSettings.CrossPartitionReferenceMode.valueOf(HapiProperties.getPartitioningCrossPartitionReferenceMode()); partitionSettings.setAllowReferencesAcrossPartitions(mode); partitionSettings.setIncludePartitionInSearchHashes(HapiProperties.getIncludePartitionInSearchHashes()); registerProvider(appCtx.getBean(PartitionManagementProvider.class)); if (HapiProperties.getPartitioningMultitenancyEnabled()) { registerInterceptor(new RequestTenantPartitionInterceptor()); setTenantIdentificationStrategy(new UrlBaseTenantIdentificationStrategy()); registerProviders(appCtx.getBean(PartitionManagementProvider.class)); }
<<<<<<< private static boolean getPropertyBoolean(String thePropertyName, boolean theDefaultValue) { String value = getProperty(thePropertyName, Boolean.toString(theDefaultValue)); return Boolean.parseBoolean(value); } private static <T extends Enum> T getPropertyEnum(String thePropertyName, Class<T> theEnumType, T theDefaultValue) { String value = getProperty(thePropertyName, theDefaultValue.name()); return (T) Enum.valueOf(theEnumType, value); } public static boolean getBulkExportEnabled() { return HapiProperties.getBooleanProperty(BULK_EXPORT_ENABLED, true); } ======= public static boolean getEnforceReferentialIntegrityOnDelete() { return HapiProperties.getBooleanProperty(ENFORCE_REFERENTIAL_INTEGRITY_ON_DELETE, true); } public static boolean getEnforceReferentialIntegrityOnWrite() { return HapiProperties.getBooleanProperty(ENFORCE_REFERENTIAL_INTEGRITY_ON_WRITE, true); } public static boolean getAutoCreatePlaceholderReferenceTargets() { return HapiProperties.getBooleanProperty(AUTO_CREATE_PLACEHOLDER_REFERENCE_TARGETS, true); } public static boolean getEnableIndexMissingFields() { return HapiProperties.getBooleanProperty(ENABLE_INDEX_MISSING_FIELDS, false); } >>>>>>> public static boolean getEnforceReferentialIntegrityOnDelete() { return HapiProperties.getBooleanProperty(ENFORCE_REFERENTIAL_INTEGRITY_ON_DELETE, true); } public static boolean getEnforceReferentialIntegrityOnWrite() { return HapiProperties.getBooleanProperty(ENFORCE_REFERENTIAL_INTEGRITY_ON_WRITE, true); } public static boolean getAutoCreatePlaceholderReferenceTargets() { return HapiProperties.getBooleanProperty(AUTO_CREATE_PLACEHOLDER_REFERENCE_TARGETS, true); } public static boolean getEnableIndexMissingFields() { return HapiProperties.getBooleanProperty(ENABLE_INDEX_MISSING_FIELDS, false); } private static boolean getPropertyBoolean(String thePropertyName, boolean theDefaultValue) { String value = getProperty(thePropertyName, Boolean.toString(theDefaultValue)); return Boolean.parseBoolean(value); } private static <T extends Enum> T getPropertyEnum(String thePropertyName, Class<T> theEnumType, T theDefaultValue) { String value = getProperty(thePropertyName, theDefaultValue.name()); return (T) Enum.valueOf(theEnumType, value); } public static boolean getBulkExportEnabled() { return HapiProperties.getBooleanProperty(BULK_EXPORT_ENABLED, true); }
<<<<<<< retVal.setAllowContainsSearches(this.allowContainsSearches); retVal.setAllowMultipleDelete(this.allowMultipleDelete); retVal.setAllowExternalReferences(this.allowExternalReferences); retVal.setExpungeEnabled(this.expungeEnabled); retVal.setAutoCreatePlaceholderReferenceTargets(this.allowPlaceholderReferences); retVal.setEmailFromAddress(this.emailFrom); ======= Boolean allowMultipleDelete = HapiProperties.getAllowMultipleDelete(); retVal.setAllowMultipleDelete(allowMultipleDelete); ourLog.info("Server configured to " + (allowMultipleDelete ? "allow" : "deny") + " multiple deletes"); Boolean allowExternalReferences = HapiProperties.getAllowExternalReferences(); retVal.setAllowExternalReferences(allowExternalReferences); ourLog.info("Server configured to " + (allowExternalReferences ? "allow" : "deny") + " external references"); Boolean expungeEnabled = HapiProperties.getExpungeEnabled(); retVal.setExpungeEnabled(expungeEnabled); ourLog.info("Server configured to " + (expungeEnabled ? "enable" : "disable") + " expunges"); Boolean allowPlaceholderReferences = HapiProperties.getAllowPlaceholderReferences(); retVal.setAutoCreatePlaceholderReferenceTargets(allowPlaceholderReferences); ourLog.info("Server configured to " + (allowPlaceholderReferences ? "allow" : "deny") + " placeholder references"); Integer maxFetchSize = HapiProperties.getMaximumFetchSize(); retVal.setFetchSizeDefaultMaximum(maxFetchSize); ourLog.info("Server configured to have a maximum fetch size of " + (maxFetchSize == Integer.MAX_VALUE? "'unlimited'": maxFetchSize)); >>>>>>> retVal.setAllowContainsSearches(this.allowContainsSearches); retVal.setAllowMultipleDelete(this.allowMultipleDelete); retVal.setAllowExternalReferences(this.allowExternalReferences); retVal.setExpungeEnabled(this.expungeEnabled); retVal.setAutoCreatePlaceholderReferenceTargets(this.allowPlaceholderReferences); retVal.setEmailFromAddress(this.emailFrom); Integer maxFetchSize = HapiProperties.getMaximumFetchSize(); retVal.setFetchSizeDefaultMaximum(maxFetchSize); ourLog.info("Server configured to have a maximum fetch size of " + (maxFetchSize == Integer.MAX_VALUE? "'unlimited'": maxFetchSize));
<<<<<<< import ca.uhn.fhir.jpa.model.entity.ModelConfig; ======= import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider; >>>>>>> import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
<<<<<<< public static Boolean getCorsAllowedCredentials() { return HapiProperties.getBooleanProperty(CORS_ALLOW_CREDENTIALS, false); } } ======= public static boolean getValidateRequestsEnabled() { return HapiProperties.getBooleanProperty(VALIDATE_REQUESTS_ENABLED, false); } public static boolean getValidateResponsesEnabled() { return HapiProperties.getBooleanProperty(VALIDATE_RESPONSES_ENABLED, false); } public static boolean getFilterSearchEnabled() { return HapiProperties.getBooleanProperty(FILTER_SEARCH_ENABLED, true); } public static boolean getGraphqlEnabled() { return HapiProperties.getBooleanProperty(GRAPHQL_ENABLED, true); } } >>>>>>> public static Boolean getCorsAllowedCredentials() { return HapiProperties.getBooleanProperty(CORS_ALLOW_CREDENTIALS, false); } public static boolean getValidateRequestsEnabled() { return HapiProperties.getBooleanProperty(VALIDATE_REQUESTS_ENABLED, false); } public static boolean getValidateResponsesEnabled() { return HapiProperties.getBooleanProperty(VALIDATE_RESPONSES_ENABLED, false); } public static boolean getFilterSearchEnabled() { return HapiProperties.getBooleanProperty(FILTER_SEARCH_ENABLED, true); } public static boolean getGraphqlEnabled() { return HapiProperties.getBooleanProperty(GRAPHQL_ENABLED, true); } }
<<<<<<< import android.support.v4.app.Fragment; ======= import android.support.v4.content.ContextCompat; >>>>>>> import android.support.v4.app.Fragment; import android.support.v4.content.ContextCompat; <<<<<<< import com.marverenic.music.utils.Navigate; import com.marverenic.music.utils.Prefs; import com.marverenic.music.utils.Themes; ======= import com.marverenic.music.data.store.PreferencesStore; import com.marverenic.music.data.store.ThemeStore; >>>>>>> import com.marverenic.music.data.store.PreferencesStore; import com.marverenic.music.data.store.ThemeStore; import com.marverenic.music.utils.Navigate; <<<<<<< } else if (DirectoryListFragment.class.getName().equals(preference.getFragment())) { Fragment fragment = new DirectoryListFragment(); Bundle args = new Bundle(); args.putString(DirectoryListFragment.PREFERENCE_EXTRA, preference.getKey()); args.putString(DirectoryListFragment.TITLE_EXTRA, preference.getTitle().toString()); fragment.setArguments(args); Navigate.to(getActivity(), fragment, R.id.prefFrame); return true; } else if (Prefs.ADD_SHORTCUT.equals(preference.getKey())) { ======= } else if (preference.getKey().equals(getString(R.string.pref_key_create_launcher_icon))) { >>>>>>> } else if (DirectoryListFragment.class.getName().equals(preference.getFragment())) { Fragment fragment = new DirectoryListFragment(); Bundle args = new Bundle(); args.putString(DirectoryListFragment.PREFERENCE_EXTRA, preference.getKey()); args.putString(DirectoryListFragment.TITLE_EXTRA, preference.getTitle().toString()); fragment.setArguments(args); Navigate.to(getActivity(), fragment, R.id.prefFrame); return true; } else if (preference.getKey().equals(getString(R.string.pref_key_create_launcher_icon))) {
<<<<<<< private PlaybackPersistenceManager mPersistenceManager; ======= private PlayerServiceConnection mConnection; >>>>>>> private PlaybackPersistenceManager mPersistenceManager; private PlayerServiceConnection mConnection; <<<<<<< public ServicePlayerController(Context context, PreferenceStore preferenceStore, PlaybackPersistenceManager persistenceManager) { ======= private Set<ServiceBinding> mActiveBindings; public ServicePlayerController(Context context, PreferenceStore preferenceStore) { >>>>>>> private Set<ServiceBinding> mActiveBindings; public ServicePlayerController(Context context, PreferenceStore preferenceStore, PlaybackPersistenceManager persistenceManager) { <<<<<<< mPersistenceManager = persistenceManager; ======= mConnection = new PlayerServiceConnection(); >>>>>>> mPersistenceManager = persistenceManager; mConnection = new PlayerServiceConnection(); <<<<<<< Intent serviceIntent = PlayerService.newIntent(mContext, true); initAllPropertyFallbacks(); // Manually start the service to ensure that it is associated with this task and can // appropriately set its dismiss behavior mContext.startService(serviceIntent); ======= >>>>>>> initAllPropertyFallbacks(); <<<<<<< private void initAllPropertyFallbacks() { mPlaying.setFallbackFunction(() -> false); mNowPlaying.setFallbackFunction(() -> mPersistenceManager.getNowPlaying(mContext, mShuffleMode.lastValue())); mQueue.setFallbackFunction(() -> mPersistenceManager.getQueue(mContext, mShuffleMode.lastValue())); mQueuePosition.setFallbackFunction(mPersistenceManager::getQueueIndex); mCurrentPosition.setFallbackFunction(mPersistenceManager::getSeekPosition); mDuration.setFallbackFunction(() -> { Song nowPlaying = mPersistenceManager.getNowPlaying(mContext, mShuffleMode.lastValue()); if (nowPlaying != null) { return (int) nowPlaying.getSongDuration(); } else { return 0; } }); } private void ensureServiceStarted() { if (mBinding == null) { startService(); ======= private void disconnectService() { releaseAllProperties(); mBinding = null; mServiceStartRequestTime = 0; if (mRequestQueueSubscription != null) { mRequestQueueSubscription.unsubscribe(); mRequestQueueSubscription = null; >>>>>>> private void initAllPropertyFallbacks() { mPlaying.setFallbackFunction(() -> false); mNowPlaying.setFallbackFunction(() -> mPersistenceManager.getNowPlaying(mContext, mShuffleMode.lastValue())); mQueue.setFallbackFunction(() -> mPersistenceManager.getQueue(mContext, mShuffleMode.lastValue())); mQueuePosition.setFallbackFunction(mPersistenceManager::getQueueIndex); mCurrentPosition.setFallbackFunction(mPersistenceManager::getSeekPosition); mDuration.setFallbackFunction(() -> { Song nowPlaying = mPersistenceManager.getNowPlaying(mContext, mShuffleMode.lastValue()); if (nowPlaying != null) { return (int) nowPlaying.getSongDuration(); } else { return 0; } }); } private void disconnectService() { releaseAllProperties(); mBinding = null; mServiceStartRequestTime = 0; if (mRequestQueueSubscription != null) { mRequestQueueSubscription.unsubscribe(); mRequestQueueSubscription = null; <<<<<<< private static final class Prop<T> { private final String mName; private final T mNullValue; private final BehaviorSubject<Optional<T>> mSubject; private final Observable<T> mObservable; @Nullable private Retriever<T> mFallbackRetriever; @Nullable private Retriever<T> mRetriever; public Prop(String propertyName) { this(propertyName, null); } public Prop(String propertyName, T nullValue) { mName = propertyName; mNullValue = nullValue; mSubject = BehaviorSubject.create(); mObservable = mSubject.filter(Optional::isPresent) .map(Optional::getValue) .distinctUntilChanged(); } public void setFunction(Retriever<T> retriever) { mRetriever = retriever; } public void setFallbackFunction(@Nullable Retriever<T> retriever) { mFallbackRetriever = retriever; } public void invalidate() { mSubject.onNext(Optional.empty()); Observable<T> retriever; if (mRetriever != null) { retriever = Observable.fromCallable(mRetriever::retrieve); } else if (mFallbackRetriever != null) { retriever = Observable.fromCallable(mFallbackRetriever::retrieve); } else { return; } retriever.subscribeOn(Schedulers.computation()) .map(data -> (data == null) ? mNullValue : data) .map(Optional::ofNullable) .observeOn(AndroidSchedulers.mainThread()) .subscribe(mSubject::onNext, throwable -> { Timber.e(throwable, "Failed to fetch " + mName + " property."); }); } public boolean isSubscribedTo() { return mSubject.hasObservers(); } public void setValue(T value) { mSubject.onNext(Optional.ofNullable(value)); } public boolean hasValue() { return mSubject.getValue() != null && mSubject.getValue().isPresent(); } public T lastValue() { return mSubject.getValue().getValue(); } public Observable<T> getObservable() { return mObservable; } interface Retriever<T> { T retrieve() throws Exception; } } ======= >>>>>>>
<<<<<<< import com.marverenic.music.player.persistence.PlaybackPersistenceManager; ======= import com.marverenic.music.player.extensions.MusicPlayerExtension; >>>>>>> import com.marverenic.music.player.persistence.PlaybackPersistenceManager; import com.marverenic.music.player.extensions.MusicPlayerExtension; <<<<<<< public void saveState() { ======= /** * Saves the player's current state to a file with the name {@link #QUEUE_FILE} in * the app's external files directory specified by {@link Context#getExternalFilesDir(String)} * @throws IOException * @see #loadState() */ public void saveState() throws IOException { requireNotReleased(); >>>>>>> public void saveState() { requireNotReleased();
<<<<<<< import com.github.hykes.codegen.utils.NotifyUtil; ======= import com.github.hykes.codegen.utils.Icons; >>>>>>> import com.github.hykes.codegen.utils.NotifyUtil; import com.github.hykes.codegen.utils.Icons;
<<<<<<< import org.onebusaway.gtfs.model.Area; ======= import org.onebusaway.gtfs.model.Block; >>>>>>> import org.onebusaway.gtfs.model.Area; import org.onebusaway.gtfs.model.Block; <<<<<<< _entityClasses.add(Area.class); ======= _entityClasses.add(TimetableNote.class); >>>>>>> _entityClasses.add(TimetableNote.class); _entityClasses.add(Area.class); <<<<<<< } else if (entity instanceof Area) { Area area = (Area) entity; registerAgencyId(Area.class, area.getId()); ======= } else if (entity instanceof TimetableNote) { TimetableNote note = (TimetableNote) entity; registerAgencyId(TimetableNote.class, note.getId()); >>>>>>> } else if (entity instanceof TimetableNote) { TimetableNote note = (TimetableNote) entity; registerAgencyId(TimetableNote.class, note.getId()); } else if (entity instanceof Area) { Area area = (Area) entity; registerAgencyId(Area.class, area.getId());
<<<<<<< import org.onebusaway.gtfs.model.Area; ======= import org.onebusaway.gtfs.model.Block; >>>>>>> import org.onebusaway.gtfs.model.Area; import org.onebusaway.gtfs.model.Block; <<<<<<< /**** * {@link Area} Methods ****/ public Collection<Area> getAllAreas(); ======= public Collection<Block> getAllBlocks(); public Block getBlockForId(int id); >>>>>>> public Collection<Block> getAllBlocks(); public Block getBlockForId(int id); /**** * {@link Area} Methods ****/ public Collection<Area> getAllAreas();
<<<<<<< String setExceptionByIp(String ip); ======= String getProviderIp(String name, int age); >>>>>>> String setExceptionByIp(String ip); String getProviderIp(String name, int age);
<<<<<<< public String setExceptionByIp(String ip) { return cartService.setExceptionByIp(ip); } ======= public String getRemoteIp(String name, int age) { return cartService.getProviderIp(name, age); } >>>>>>> public String setExceptionByIp(String ip) { return cartService.setExceptionByIp(ip); } public String getRemoteIp(String name, int age) { return cartService.getProviderIp(name, age); }
<<<<<<< private final Thread maintenanceThread; private final ExecutorService retireThreadPool = Executors.newCachedThreadPool(); public HourglassReaderManager(final Hourglass<R, D, V> hourglass, HourglassDirectoryManagerFactory<V> dirMgrFactory, ======= private ExecutorService threadPool = Executors.newCachedThreadPool(); private final Comparator<String> _versionComparator; public HourglassReaderManager(final Hourglass<R, D> hourglass, HourglassDirectoryManagerFactory dirMgrFactory, >>>>>>> private final Thread maintenanceThread; private final ExecutorService retireThreadPool = Executors.newCachedThreadPool(); private final Comparator<String> _versionComparator; public HourglassReaderManager(final Hourglass<R, D> hourglass, HourglassDirectoryManagerFactory dirMgrFactory, <<<<<<< box = new Box<R, D, V>(initArchives, Collections.EMPTY_LIST, Collections.EMPTY_LIST, _decorator); maintenanceThread = new Thread(new Runnable(){ ======= box = new Box<R, D>(initArchives, Collections.EMPTY_LIST, Collections.EMPTY_LIST, _decorator); _versionComparator = versionComparator; threadPool.execute(new Runnable(){ >>>>>>> _versionComparator = versionComparator; box = new Box<R, D>(initArchives, Collections.EMPTY_LIST, Collections.EMPTY_LIST, _decorator); maintenanceThread = new Thread(new Runnable(){
<<<<<<< DefaultZoieVersionFactory defaultZoieVersionFactory = new DefaultZoieVersionFactory(); final ZoieSystem<IndexReader,String, DefaultZoieVersion> idxSystem = createZoie(idxDir,true, 100,defaultZoieVersionFactory); ======= final ZoieSystem<IndexReader,String> idxSystem = createZoie(idxDir,true, 100); for(String bname : idxSystem.getStandardMBeanNames()) { registerMBean(idxSystem.getStandardMBean(bname), bname); } >>>>>>> DefaultZoieVersionFactory defaultZoieVersionFactory = new DefaultZoieVersionFactory(); final ZoieSystem<IndexReader,String, DefaultZoieVersion> idxSystem = createZoie(idxDir,true, 100,defaultZoieVersionFactory); for(String bname : idxSystem.getStandardMBeanNames()) { registerMBean(idxSystem.getStandardMBean(bname), bname); }
<<<<<<< public SearchIndexManager(DirectoryManager<V> dirMgr,IndexReaderDecorator<R> indexReaderDecorator,DocIDMapperFactory docIDMapperFactory, ZoieVersionFactory<V> zoieVersionFactory) ======= public SearchIndexManager(DirectoryManager dirMgr,IndexReaderDecorator<R> indexReaderDecorator,DocIDMapperFactory docIDMapperFactory, RAMIndexFactory<R> ramIndexFactory) >>>>>>> public SearchIndexManager(DirectoryManager<V> dirMgr,IndexReaderDecorator<R> indexReaderDecorator,DocIDMapperFactory docIDMapperFactory, ZoieVersionFactory<V> zoieVersionFactory, RAMIndexFactory<R, V> ramIndexFactory) <<<<<<< _zoieVersionFactory = zoieVersionFactory; //dirMgr.setVersionFactory(_zoieVersionFactory); ======= _ramIndexFactory = ramIndexFactory; >>>>>>> _zoieVersionFactory = zoieVersionFactory; _ramIndexFactory = ramIndexFactory; <<<<<<< V version = _diskIndex.getVersion(); RAMSearchIndex<R,V> memIndexA = new RAMSearchIndex<R,V>(version, _indexReaderDecorator,this); Mem<R,V> mem = new Mem<R,V>(memIndexA, null, memIndexA, null, diskIndexReader); ======= long version = _diskIndex.getVersion(); RAMSearchIndex<R> memIndexA = _ramIndexFactory.newInstance(version, _indexReaderDecorator,this); Mem<R> mem = new Mem<R>(memIndexA, null, memIndexA, null, diskIndexReader); >>>>>>> V version = _diskIndex.getVersion(); RAMSearchIndex<R,V> memIndexA = _ramIndexFactory.newInstance(version, _indexReaderDecorator,this); Mem<R,V> mem = new Mem<R,V>(memIndexA, null, memIndexA, null, diskIndexReader); <<<<<<< RAMSearchIndex<R,V> memIndexB = new RAMSearchIndex<R,V>(version, _indexReaderDecorator,this); Mem<R,V> mem = new Mem<R,V>(memIndexA, memIndexB, memIndexB, memIndexA, oldMem.get_diskIndexReader()); ======= RAMSearchIndex<R> memIndexB = _ramIndexFactory.newInstance(version, _indexReaderDecorator,this); Mem<R> mem = new Mem<R>(memIndexA, memIndexB, memIndexB, memIndexA, oldMem.get_diskIndexReader()); >>>>>>> RAMSearchIndex<R,V> memIndexB = _ramIndexFactory.newInstance(version, _indexReaderDecorator,this); Mem<R,V> mem = new Mem<R,V>(memIndexA, memIndexB, memIndexB, memIndexA, oldMem.get_diskIndexReader()); <<<<<<< Mem<R,V> oldMem = _mem; Mem<R,V> mem = new Mem<R,V>(oldMem.get_memIndexB(), null, oldMem.get_memIndexB(), null, diskIndexReader); ======= Mem<R> oldMem = _mem; Mem<R> mem = new Mem<R>(oldMem.get_memIndexB(), null, oldMem.get_memIndexB(), null, diskIndexReader); if (oldMem.get_memIndexA()!=null){oldMem.get_memIndexA().close();} >>>>>>> Mem<R,V> oldMem = _mem; Mem<R,V> mem = new Mem<R,V>(oldMem.get_memIndexB(), null, oldMem.get_memIndexB(), null, diskIndexReader); if (oldMem.get_memIndexA()!=null){oldMem.get_memIndexA().close();} <<<<<<< RAMSearchIndex<R,V> memIndexA = new RAMSearchIndex<R,V>(_diskIndex.getVersion(), _indexReaderDecorator, this); Mem<R,V> mem = new Mem<R,V>(memIndexA, null, memIndexA, null, null); ======= if (_mem.get_memIndexA()!=null){_mem.get_memIndexA().close();} if (_mem.get_memIndexB()!=null){_mem.get_memIndexB().close();} RAMSearchIndex<R> memIndexA = _ramIndexFactory.newInstance(_diskIndex.getVersion(), _indexReaderDecorator, this); Mem<R> mem = new Mem<R>(memIndexA, null, memIndexA, null, null); >>>>>>> if (_mem.get_memIndexA()!=null){_mem.get_memIndexA().close();} if (_mem.get_memIndexB()!=null){_mem.get_memIndexB().close();} RAMSearchIndex<R,V> memIndexA = _ramIndexFactory.newInstance(_diskIndex.getVersion(), _indexReaderDecorator, this); Mem<R,V> mem = new Mem<R,V>(memIndexA, null, memIndexA, null, null);
<<<<<<< DefaultZoieVersionFactory defaultZoieVersionFactory = new DefaultZoieVersionFactory(); final ZoieSystem<IndexReader,String,DefaultZoieVersion> idxSystem = createZoie(idxDir,true, 100,defaultZoieVersionFactory); ======= final ZoieSystem<IndexReader,String> idxSystem = createZoie(idxDir,true, 100); idxSystem.getAdminMBean().setFreshness(50); >>>>>>> DefaultZoieVersionFactory defaultZoieVersionFactory = new DefaultZoieVersionFactory(); final ZoieSystem<IndexReader,String,DefaultZoieVersion> idxSystem = createZoie(idxDir,true, 100,defaultZoieVersionFactory); idxSystem.getAdminMBean().setFreshness(50);
<<<<<<< private Collection<DataEvent<D, V>> _batch; private V _currentVersion; private final StreamDataProvider<D, V> _dataProvider; private volatile boolean _paused; private volatile boolean _stop; ======= private Collection<DataEvent<D>> _batch; private String _currentVersion; private final StreamDataProvider<D> _dataProvider; private boolean _paused; private boolean _stop; >>>>>>> private Collection<DataEvent<D>> _batch; private String _currentVersion; private final StreamDataProvider<D> _dataProvider; private volatile boolean _paused; private volatile boolean _stop;
<<<<<<< public void syncWithVersion(long timeInMillis, V version) throws ZoieException ======= public void syncWthVersion(long timeInMillis, String version) throws ZoieException >>>>>>> public void syncWithVersion(long timeInMillis, String version) throws ZoieException
<<<<<<< public Hourglass(HourglassDirectoryManagerFactory<V> dirMgrFactory, ZoieIndexableInterpreter<D> interpreter, IndexReaderDecorator<R> readerDecorator,ZoieConfig<V> zoieConfig) ======= private final HourGlassScheduler _scheduler; public Hourglass(HourglassDirectoryManagerFactory dirMgrFactory, ZoieIndexableInterpreter<V> interpreter, IndexReaderDecorator<R> readerDecorator,ZoieConfig zoieConfig) >>>>>>> private final HourGlassScheduler _scheduler; public Hourglass(HourglassDirectoryManagerFactory<V> dirMgrFactory, ZoieIndexableInterpreter<D> interpreter, IndexReaderDecorator<R> readerDecorator,ZoieConfig<V> zoieConfig)
<<<<<<< idxSystem.syncWithVersion(10000, zvt2); ======= idxSystem.syncWthVersion(10000, "1"); >>>>>>> idxSystem.syncWithVersion(10000, "1"); <<<<<<< idxSystem.syncWithVersion(10000, zvt); ======= idxSystem.syncWthVersion(10000, "" + (count - 1)); >>>>>>> idxSystem.syncWithVersion(10000, "" + (count - 1)); <<<<<<< asyncConsumer.syncWithVersion(timeout, zvt); ======= asyncConsumer.syncWthVersion(timeout, ""+(count-1)); >>>>>>> asyncConsumer.syncWithVersion(timeout, ""+(count-1)); <<<<<<< idxSystem.syncWithVersion(100000, zvt); ======= idxSystem.syncWthVersion(100000, ""+(count-1)); >>>>>>> idxSystem.syncWithVersion(100000, ""+(count-1)); <<<<<<< idxSystem.syncWithVersion(100000, zvt); ======= idxSystem.syncWthVersion(100000, ""+version); >>>>>>> idxSystem.syncWithVersion(100000, ""+version); <<<<<<< idxSystem.syncWithVersion(10000, zvt); ======= idxSystem.syncWthVersion(10000, ""+(count-1)); >>>>>>> idxSystem.syncWithVersion(10000, ""+(count-1)); <<<<<<< idxSystem.syncWithVersion(10000, zvt); ======= idxSystem.syncWthVersion(10000, ""+version); >>>>>>> idxSystem.syncWithVersion(10000, ""+version); <<<<<<< idxSystem.syncWithVersion(10000, zvt); ======= idxSystem.syncWthVersion(10000, ""+(count-1)); >>>>>>> idxSystem.syncWithVersion(10000, ""+(count-1)); <<<<<<< idxSystem.syncWithVersion(10000, zvt); ======= idxSystem.syncWthVersion(10000, ""+version); >>>>>>> idxSystem.syncWithVersion(10000, ""+version);
<<<<<<< import proj.zoie.impl.indexing.internal.IndexSignature; import proj.zoie.impl.indexing.internal.ZoieIndexDeletionPolicy; import proj.zoie.api.ZoieVersion; ======= >>>>>>> import proj.zoie.api.ZoieVersion; <<<<<<< private final ReaderManager<R, D,V> _readerMgr; private volatile V _currentVersion = null; ======= private final HourglassReaderManager<R, V> _readerMgr; private volatile long _currentVersion = 0L; >>>>>>> private final HourglassReaderManager<R, D, V> _readerMgr; private volatile V _currentVersion = null; <<<<<<< private final HourGlassScheduler _scheduler; public volatile long SLA = 10; // getIndexReaders should return in 10ms or a warning is logged public Hourglass(HourglassDirectoryManagerFactory<V> dirMgrFactory, ZoieIndexableInterpreter<D> interpreter, IndexReaderDecorator<R> readerDecorator,ZoieConfig<V> zoieConfig) ======= final HourGlassScheduler _scheduler; public volatile long SLA = 4; // getIndexReaders should return in 4ms or a warning is logged public Hourglass(HourglassDirectoryManagerFactory dirMgrFactory, ZoieIndexableInterpreter<V> interpreter, IndexReaderDecorator<R> readerDecorator,ZoieConfig zoieConfig) >>>>>>> final HourGlassScheduler _scheduler; public volatile long SLA = 4; // getIndexReaders should return in 4ms or a warning is logged public Hourglass(HourglassDirectoryManagerFactory<V> dirMgrFactory, ZoieIndexableInterpreter<D> interpreter, IndexReaderDecorator<R> readerDecorator,ZoieConfig<V> zoieConfig) <<<<<<< _readerMgr = new ReaderManager<R, D,V>(this, _dirMgrFactory, _decorator, loadArchives()); ======= _readerMgr = new HourglassReaderManager<R, V>(this, _dirMgrFactory, _decorator, loadArchives()); >>>>>>> _readerMgr = new HourglassReaderManager<R, D, V>(this, _dirMgrFactory, _decorator, loadArchives()); <<<<<<< private ZoieSystem<R, D,V> createZoie(DirectoryManager<V> dirmgr) ======= ZoieSystem<R, V> createZoie(DirectoryManager dirmgr) >>>>>>> ZoieSystem<R, D,V> createZoie(DirectoryManager<V> dirmgr)
<<<<<<< import org.auraframework.Aura; import org.auraframework.adapter.ConfigAdapter; ======= >>>>>>> import org.auraframework.Aura; import org.auraframework.adapter.ConfigAdapter; <<<<<<< private class ClientComponentClassWriter { private static final String REQUIRE_LOCKER = "aura:requireLocker"; final BaseComponentDef def; final DefDescriptor<? extends BaseComponentDef> descriptor; final DefDescriptor<? extends BaseComponentDef> superDescriptor; final String className; final String superClassName; public ClientComponentClassWriter(BaseComponentDef def) throws QuickFixException { this.def = def; descriptor = componentDef.getDescriptor(); superDescriptor = def.getExtendsDescriptor(); className = getClassName(descriptor); superClassName = getFullyQualifiedName(superDescriptor); } ======= final private String getFullyQualifiedName(DefDescriptor<? extends BaseComponentDef> descriptor) { if (descriptor == null) { return null; } return descriptor.getQualifiedName(); } >>>>>>> final private String getFullyQualifiedName(DefDescriptor<? extends BaseComponentDef> descriptor) { if (descriptor == null) { return null; } return descriptor.getQualifiedName(); } <<<<<<< } ======= } >>>>>>> private boolean isLockerRequired() throws QuickFixException { boolean requireLocker = false; ConfigAdapter configAdapter = Aura.getConfigAdapter(); if (configAdapter.isLockerServiceEnabled()) { requireLocker = !configAdapter.isPrivilegedNamespace(this.descriptor.getNamespace()); if (!requireLocker) { DefDescriptor<InterfaceDef> requireLockerDescr = Aura.getDefinitionService().getDefDescriptor(REQUIRE_LOCKER, InterfaceDef.class); requireLocker = componentDef.isInstanceOf(requireLockerDescr); } } return requireLocker; } private static final String REQUIRE_LOCKER = "aura:requireLocker"; }
<<<<<<< import org.auraframework.Aura; import org.auraframework.css.parser.ThemeValueProvider; ======= import org.auraframework.builder.ThemeDefBuilder; >>>>>>> import org.auraframework.Aura; import org.auraframework.css.parser.ThemeValueProvider; <<<<<<< public void addAllExpressionRefs(Collection<PropertyReference> refs) { if (expressionRefs == null) { expressionRefs = Sets.newHashSet(); } expressionRefs.addAll(refs); } ======= @Override public ThemeDefImpl build() { return new ThemeDefImpl(this); } >>>>>>> public void addAllExpressionRefs(Collection<PropertyReference> refs) { if (expressionRefs == null) { expressionRefs = Sets.newHashSet(); } expressionRefs.addAll(refs); } @Override public ThemeDefImpl build() { return new ThemeDefImpl(this); }
<<<<<<< private boolean isWebkit; private boolean isFirefox; private boolean isIE6; private boolean isIE7; private boolean isIE8; private boolean isIE9; private boolean isIE10; ======= private boolean isWindowsPhone; >>>>>>> private boolean isWebkit; private boolean isFirefox; private boolean isIE6; private boolean isIE7; private boolean isIE8; private boolean isIE9; private boolean isIE10; private boolean isWindowsPhone; <<<<<<< isWebkit = false; isFirefox = false; ======= isWindowsPhone = false; >>>>>>> isWebkit = false; isFirefox = false; isWindowsPhone = false; <<<<<<< isWebkit = isBrowserWebkit(); isFirefox = isBrowserFirefox(); isIE6 = isBrowserIE6(); isIE7 = isBrowserIE7(); isIE8 = isBrowserIE8(); isIE9 = isBrowserIE9(); isIE10 = isBrowserIE10(); ======= isWindowsPhone = isPlatformWindowsPhone(); >>>>>>> isWebkit = isBrowserWebkit(); isFirefox = isBrowserFirefox(); isIE6 = isBrowserIE6(); isIE7 = isBrowserIE7(); isIE8 = isBrowserIE8(); isIE9 = isBrowserIE9(); isIE10 = isBrowserIE10(); isWindowsPhone = isPlatformWindowsPhone(); <<<<<<< // TODO: see if this can be replaced by Browser . isBrowserMobile() ======= // TODO: see if this can be replaced by BrowserInfo.isBrowserMobile() >>>>>>> // TODO: see if this can be replaced by BrowserInfo.isBrowserMobile()
<<<<<<< public String getAltLabel() { return altLabel; } public void setAltLabel(String altLabel) { this.altLabel = altLabel; } public void beforeSave() { ======= public void beforeSave() { >>>>>>> public String getAltLabel() { return altLabel; } public void setAltLabel(String altLabel) { this.altLabel = altLabel; } public void beforeSave() { <<<<<<< public static <T extends Taxon> List<? extends Taxon> getChildren(T taxon) { List<Taxon> children = new ArrayList<Taxon>(); if (taxon != null) { children.addAll(taxon.getChildren()); } sort(children); return children; } public static <T extends Taxon> void sort(List<T> taxa) { if (taxa != null && !taxa.isEmpty()) { ObjectType taxonType = taxa.get(0).getState().getType(); ToolUi ui = taxonType.as(ToolUi.class); if (!ObjectUtils.isBlank(ui.getDefaultSortField())) { Collections.sort(taxa, new ObjectFieldComparator(ui.getDefaultSortField(), true)); } } } ======= public static <T extends Taxon> List<T> getRoots(Class<T> taxonClass, Site site) { Query query = Query.from(taxonClass).where("cms.taxon.root = true"); if (site != null) { query.and(site.itemsPredicate()); } return query.selectAll(); } >>>>>>> public static <T extends Taxon> List<? extends Taxon> getChildren(T taxon) { List<Taxon> children = new ArrayList<Taxon>(); if (taxon != null) { children.addAll(taxon.getChildren()); } sort(children); return children; } public static <T extends Taxon> void sort(List<T> taxa) { if (taxa != null && !taxa.isEmpty()) { ObjectType taxonType = taxa.get(0).getState().getType(); ToolUi ui = taxonType.as(ToolUi.class); if (!ObjectUtils.isBlank(ui.getDefaultSortField())) { Collections.sort(taxa, new ObjectFieldComparator(ui.getDefaultSortField(), true)); } } } public static <T extends Taxon> List<T> getRoots(Class<T> taxonClass, Site site) { Query query = Query.from(taxonClass).where("cms.taxon.root = true"); if (site != null) { query.and(site.itemsPredicate()); } return query.selectAll(); }
<<<<<<< createScanner.close(); Assert.assertEquals(expected, actual); ======= assertEquals(expected, actual); >>>>>>> createScanner.close(); assertEquals(expected, actual); <<<<<<< for (Entry<Key,Value> entry : metaScanner) { String cq = entry.getKey().getColumnQualifier().toString(); Path path = new Path(cq); Assert.assertTrue("relative path not deleted " + path, path.depth() > 2); } ======= for (Entry<Key,Value> entry : metaScanner) { String cq = entry.getKey().getColumnQualifier().toString(); Path path = new Path(cq); assertTrue("relative path not deleted " + path.toString(), path.depth() > 2); >>>>>>> for (Entry<Key,Value> entry : metaScanner) { String cq = entry.getKey().getColumnQualifier().toString(); Path path = new Path(cq); assertTrue("relative path not deleted " + path, path.depth() > 2); } <<<<<<< Assert.fail("Unexpected volume " + path); } ======= fail("Unexpected volume " + path); } >>>>>>> fail("Unexpected volume " + path); }
<<<<<<< import java.util.Locale; ======= import java.util.List; >>>>>>> import java.util.List; import java.util.Locale; <<<<<<< @ToolUi.Placeholder("Default") @ToolUi.Tab("Advanced") @ToolUi.Values({ "v2", "v3" }) private String theme; ======= @Indexed @Embedded @ToolUi.Hidden private List<LoginToken> loginTokens; >>>>>>> @ToolUi.Placeholder("Default") @ToolUi.Tab("Advanced") @ToolUi.Values({ "v2", "v3" }) private String theme; @Indexed @Embedded @ToolUi.Hidden private List<LoginToken> loginTokens;
<<<<<<< import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; ======= import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; >>>>>>> import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; import java.util.Iterator; <<<<<<< import java.util.UUID; ======= import java.util.List; import java.util.UUID; >>>>>>> import java.util.UUID; <<<<<<< @Indexed(unique = true) @ToolUi.Hidden private Set<String> contentLocks; @ToolUi.Hidden private Set<UUID> automaticallySavedDraftIds; ======= @Indexed @Embedded @ToolUi.Hidden private List<LoginToken> loginTokens; >>>>>>> @Indexed(unique = true) @ToolUi.Hidden private Set<String> contentLocks; @ToolUi.Hidden private Set<UUID> automaticallySavedDraftIds; @Indexed @Embedded @ToolUi.Hidden private List<LoginToken> loginTokens; <<<<<<< @Override public Iterable<? extends ToolUser> getUsers() { return Collections.singleton(this); } ======= public String generateLoginToken() { LoginToken loginToken = new LoginToken(); getLoginTokens().add(loginToken); save(); return loginToken.getToken(); } public void refreshLoginToken(String token) { Iterator<LoginToken> iter = getLoginTokens().iterator(); while (iter.hasNext()) { LoginToken loginToken = iter.next(); if (loginToken.getToken().equals(token)) { loginToken.refreshToken(); } else if (!loginToken.isValid()) { iter.remove(); } } save(); } public void removeLoginToken(String token) { LoginToken loginToken = getLoginToken(token); if (loginToken != null) { getLoginTokens().remove(loginToken); save(); } } public LoginToken getLoginToken(String token) { for (LoginToken loginToken : getLoginTokens()) { if (loginToken.getToken().equals(token) && loginToken.isValid()) { return loginToken; } } return null; } public List<LoginToken> getLoginTokens() { if (loginTokens == null) { loginTokens = new ArrayList<LoginToken>(); } return loginTokens; } public void setLoginTokens(List<LoginToken> loginTokens) { this.loginTokens = loginTokens; } public static class LoginToken extends Record { @Indexed private String token; private Long expireTimestamp; public LoginToken() { this.token = UUID.randomUUID().toString(); refreshToken(); } public String getToken() { return token; } public Long getExpireTimestamp() { return expireTimestamp; } public void refreshToken() { long sessionTimeout = Settings.getOrDefault(long.class, "cms/tool/sessionTimeout", 0L); if (sessionTimeout == 0L) { this.expireTimestamp = 0L; } else { this.expireTimestamp = System.currentTimeMillis() + sessionTimeout; } } public boolean isValid() { if (getExpireTimestamp() == 0L) { return true; } return getExpireTimestamp() > System.currentTimeMillis(); } } >>>>>>> @Override public Iterable<? extends ToolUser> getUsers() { return Collections.singleton(this); } public String generateLoginToken() { LoginToken loginToken = new LoginToken(); getLoginTokens().add(loginToken); save(); return loginToken.getToken(); } public void refreshLoginToken(String token) { Iterator<LoginToken> iter = getLoginTokens().iterator(); while (iter.hasNext()) { LoginToken loginToken = iter.next(); if (loginToken.getToken().equals(token)) { loginToken.refreshToken(); } else if (!loginToken.isValid()) { iter.remove(); } } save(); } public void removeLoginToken(String token) { LoginToken loginToken = getLoginToken(token); if (loginToken != null) { getLoginTokens().remove(loginToken); save(); } } public LoginToken getLoginToken(String token) { for (LoginToken loginToken : getLoginTokens()) { if (loginToken.getToken().equals(token) && loginToken.isValid()) { return loginToken; } } return null; } public List<LoginToken> getLoginTokens() { if (loginTokens == null) { loginTokens = new ArrayList<LoginToken>(); } return loginTokens; } public void setLoginTokens(List<LoginToken> loginTokens) { this.loginTokens = loginTokens; } public static class LoginToken extends Record { @Indexed private String token; private Long expireTimestamp; public LoginToken() { this.token = UUID.randomUUID().toString(); refreshToken(); } public String getToken() { return token; } public Long getExpireTimestamp() { return expireTimestamp; } public void refreshToken() { long sessionTimeout = Settings.getOrDefault(long.class, "cms/tool/sessionTimeout", 0L); if (sessionTimeout == 0L) { this.expireTimestamp = 0L; } else { this.expireTimestamp = System.currentTimeMillis() + sessionTimeout; } } public boolean isValid() { if (getExpireTimestamp() == 0L) { return true; } return getExpireTimestamp() > System.currentTimeMillis(); } }
<<<<<<< import com.psddev.cms.tool.file.ContentTypeValidator; import com.psddev.cms.tool.file.MetadataBeforeSave; import com.psddev.dari.db.Application; ======= >>>>>>> <<<<<<< String fileParamName = inputName + ".file"; String fileJsonParamName = fileParamName + ".json"; ======= String storageName = inputName + ".storage"; String pathName = inputName + ".path"; String contentTypeName = inputName + ".contentType"; String fileName = inputName + ".file"; >>>>>>> String fileParamName = inputName + ".file"; String fileJsonParamName = fileParamName + ".json"; <<<<<<< if ("keep".equals(action)) { newItem = StorageItemFilter.getParameter(request, fileJsonParamName, getStorageSetting(Optional.of(field))); ======= fieldValueMetadata.put("cms.edits", edits); InputStream newItemData = null; if ("keep".equals(action)) { if (fieldValue != null) { newItem = fieldValue; } else { newItem = StorageItem.Static.createIn(page.param(storageName)); newItem.setPath(page.param(pathName)); newItem.setContentType(page.param(contentTypeName)); } } else if ("newUpload".equals(action) || "dropbox".equals(action)) { String name = null; String fileContentType = null; long fileSize = 0; file = File.createTempFile("cms.", ".tmp"); MultipartRequest mpRequest; >>>>>>> fieldValueMetadata.put("cms.edits", edits); InputStream newItemData = null; if ("keep".equals(action)) { if (fieldValue != null) { newItem = fieldValue; } else { newItem = StorageItem.Static.createIn(page.param(storageName)); newItem.setPath(page.param(pathName)); newItem.setContentType(page.param(contentTypeName)); } } else if ("newUpload".equals(action) || "dropbox".equals(action)) { String name = null; String fileContentType = null; long fileSize = 0; file = File.createTempFile("cms.", ".tmp"); MultipartRequest mpRequest; <<<<<<< newItem.setData(new FileInputStream(file)); newItem.save(); } ======= Map<String, List<String>> httpHeaders = new LinkedHashMap<String, List<String>>(); httpHeaders.put("Cache-Control", Collections.singletonList("public, max-age=31536000")); httpHeaders.put("Content-Length", Collections.singletonList(String.valueOf(fileSize))); httpHeaders.put("Content-Type", Collections.singletonList(fileContentType)); fieldValueMetadata.put("http.headers", httpHeaders); newItem.setData(new FileInputStream(file)); >>>>>>> Map<String, List<String>> httpHeaders = new LinkedHashMap<String, List<String>>(); httpHeaders.put("Cache-Control", Collections.singletonList("public, max-age=31536000")); httpHeaders.put("Content-Length", Collections.singletonList(String.valueOf(fileSize))); httpHeaders.put("Content-Type", Collections.singletonList(fileContentType)); fieldValueMetadata.put("http.headers", httpHeaders); newItem.setData(new FileInputStream(file)); <<<<<<< ======= } finally { if (file != null && file.exists()) { file.delete(); } } } >>>>>>> } finally { if (file != null && file.exists()) { file.delete(); } } } <<<<<<< page.getCmsTool().isEnableFrontEndUploader() ? "data-bsp-uploader" : "", "", "name", page.h(fileParamName), "data-input-name", inputName, "data-type-id", state.getTypeId()); ======= "name", page.h(fileName), "data-input-name", inputName); >>>>>>> page.getCmsTool().isEnableFrontEndUploader() ? "data-bsp-uploader" : "", "", "name", page.h(fileParamName), "data-input-name", inputName, "data-type-id", state.getTypeId()); <<<<<<< if (fieldValue != null) { page.writeTag("input", "type", "hidden", "name", fileJsonParamName, "value", ObjectUtils.toJson(fieldValue)); } ======= >>>>>>> if (fieldValue != null) { page.writeTag("input", "type", "hidden", "name", fileJsonParamName, "value", ObjectUtils.toJson(fieldValue)); }
<<<<<<< import java.util.Date; ======= import java.util.Enumeration; >>>>>>> import java.util.Date; import java.util.Enumeration; <<<<<<< @ToolUi.Hidden private boolean external; @ToolUi.FieldDisplayType("toolUserSavedSearches") @ToolUi.Tab("Search") private Map<String, String> savedSearches; @ToolUi.Placeholder("All Contents") private InlineEditing inlineEditing; @ToolUi.Tab("Advanced") private boolean returnToDashboardOnSave; @ToolUi.Tab("Advanced") private boolean disableNavigateAwayAlert; @ToolUi.Note("Force the user to change the password on next log in.") private boolean changePasswordOnLogIn; @Indexed @ToolUi.Hidden private String changePasswordToken; @ToolUi.Hidden private long changePasswordTokenTime; ======= @Indexed @Embedded @ToolUi.Hidden private List<LoginToken> loginTokens; >>>>>>> @ToolUi.Hidden private boolean external; @ToolUi.FieldDisplayType("toolUserSavedSearches") @ToolUi.Tab("Search") private Map<String, String> savedSearches; @ToolUi.Placeholder("All Contents") private InlineEditing inlineEditing; @ToolUi.Tab("Advanced") private boolean returnToDashboardOnSave; @ToolUi.Tab("Advanced") private boolean disableNavigateAwayAlert; @ToolUi.Note("Force the user to change the password on next log in.") private boolean changePasswordOnLogIn; @Indexed @ToolUi.Hidden private String changePasswordToken; @ToolUi.Hidden private long changePasswordTokenTime; @Indexed @Embedded @ToolUi.Hidden private List<LoginToken> loginTokens; <<<<<<< public static ToolUser getByChangePasswordToken(String changePasswordToken) { ToolUser user = Query.from(ToolUser.class).where("changePasswordToken = ?", changePasswordToken).first(); long expiration = Settings.getOrDefault(long.class, "cms/tool/changePasswordTokenExpirationInHours", 24L) * 60L * 60L * 1000L; return user != null && user.changePasswordTokenTime + expiration > System.currentTimeMillis() ? user : null; } } public enum InlineEditing { ONLY_MAIN_CONTENT("Only Main Content"), DISABLED("Disabled"); private final String label; private InlineEditing(String label) { this.label = label; } @Override public String toString() { return label; } ======= public static ToolUser getByToken(String token) { ToolUser user = Query.from(ToolUser.class).where("loginTokens/token = ?", token).first(); return user != null && user.getLoginToken(token) != null ? user : null; } >>>>>>> public static ToolUser getByChangePasswordToken(String changePasswordToken) { ToolUser user = Query.from(ToolUser.class).where("changePasswordToken = ?", changePasswordToken).first(); long expiration = Settings.getOrDefault(long.class, "cms/tool/changePasswordTokenExpirationInHours", 24L) * 60L * 60L * 1000L; return user != null && user.changePasswordTokenTime + expiration > System.currentTimeMillis() ? user : null; } public static ToolUser getByToken(String token) { ToolUser user = Query.from(ToolUser.class).where("loginTokens/token = ?", token).first(); return user != null && user.getLoginToken(token) != null ? user : null; } } public enum InlineEditing { ONLY_MAIN_CONTENT("Only Main Content"), DISABLED("Disabled"); private final String label; private InlineEditing(String label) { this.label = label; } @Override public String toString() { return label; }
<<<<<<< ======= import com.psddev.cms.db.ToolUiLayoutElement; import com.psddev.dari.util.TypeDefinition; >>>>>>>
<<<<<<< import com.quickblox.ui.kit.chatmessage.adapter.listeners.QBChatMessageLinkClickListener; import com.quickblox.ui.kit.chatmessage.adapter.utils.QBChatMessageClickMovement; ======= import com.quickblox.content.model.QBFile; import com.quickblox.ui.kit.chatmessage.adapter.utils.LocationUtils; >>>>>>> import com.quickblox.content.model.QBFile; import com.quickblox.ui.kit.chatmessage.adapter.utils.LocationUtils; import com.quickblox.ui.kit.chatmessage.adapter.listeners.QBChatMessageLinkClickListener; import com.quickblox.ui.kit.chatmessage.adapter.utils.QBChatMessageClickMovement; <<<<<<< if (holder.getCustomMovementMethod() != null){ holder.getCustomMovementMethod().setPositionInAdapter(position); } holder.timeTextMessageTextView.setText(getDate(chatMessage.getDateSent() * 1000)); ======= holder.timeTextMessageTextView.setText(getDate(chatMessage.getDateSent())); >>>>>>> holder.timeTextMessageTextView.setText(getDate(chatMessage.getDateSent())); if (holder.getCustomMovementMethod() != null){ holder.getCustomMovementMethod().setPositionInAdapter(position); } holder.timeTextMessageTextView.setText(getDate(chatMessage.getDateSent() * 1000)); <<<<<<< if (holder.getCustomMovementMethod() != null){ holder.getCustomMovementMethod().setPositionInAdapter(position); } holder.timeTextMessageTextView.setText(getDate(chatMessage.getDateSent() * 1000)); ======= holder.timeTextMessageTextView.setText(getDate(chatMessage.getDateSent())); >>>>>>> holder.timeTextMessageTextView.setText(getDate(chatMessage.getDateSent())); if (holder.getCustomMovementMethod() != null){ holder.getCustomMovementMethod().setPositionInAdapter(position); } holder.timeTextMessageTextView.setText(getDate(chatMessage.getDateSent() * 1000));
<<<<<<< import com.airbnb.paris.spannable.SpannableBuilder; import com.airbnb.paris.test.MyView; import com.airbnb.paris.test.MyViewStyleApplier; ======= >>>>>>> import com.airbnb.paris.spannable.SpannableBuilder;
<<<<<<< public class StudentTVertex extends DoubleVertex implements ProbabilisticDouble, SamplableWithManyScalars<DoubleTensor> { ======= import java.util.HashMap; import java.util.Map; import java.util.Set; import static io.improbable.keanu.distributions.hyperparam.Diffs.T; import static io.improbable.keanu.tensor.TensorShapeValidation.checkTensorsMatchNonScalarShapeOrAreScalar; public class StudentTVertex extends DoubleVertex implements ProbabilisticDouble { >>>>>>> import java.util.HashMap; import java.util.Map; import java.util.Set; import static io.improbable.keanu.distributions.hyperparam.Diffs.T; import static io.improbable.keanu.tensor.TensorShapeValidation.checkTensorsMatchNonScalarShapeOrAreScalar; public class StudentTVertex extends DoubleVertex implements ProbabilisticDouble, SamplableWithManyScalars<DoubleTensor> {
<<<<<<< BayesianNetwork bayesNet = new BayesianNetwork(Arrays.asList(A, B, Cobserved)); bayesNet.probeForNonZeroMasterP(100); ======= BayesNet bayesNet = new BayesNet(Arrays.asList(A, B, Cobserved)); bayesNet.probeForNonZeroMasterP(100, random); >>>>>>> BayesianNetwork bayesNet = new BayesianNetwork(Arrays.asList(A, B, Cobserved)); bayesNet.probeForNonZeroMasterP(100, random); <<<<<<< BayesianNetwork bayesNet = new BayesianNetwork(Arrays.asList(A, B, C)); bayesNet.probeForNonZeroMasterP(100); ======= BayesNet bayesNet = new BayesNet(Arrays.asList(A, B, C)); bayesNet.probeForNonZeroMasterP(100, random); >>>>>>> BayesianNetwork bayesNet = new BayesianNetwork(Arrays.asList(A, B, C)); bayesNet.probeForNonZeroMasterP(100, random); <<<<<<< BayesianNetwork bayesNet = new BayesianNetwork(Arrays.asList(A, B, C, D, E)); bayesNet.probeForNonZeroMasterP(100); ======= BayesNet bayesNet = new BayesNet(Arrays.asList(A, B, C, D, E)); bayesNet.probeForNonZeroMasterP(100, random); >>>>>>> BayesianNetwork bayesNet = new BayesianNetwork(Arrays.asList(A, B, C, D, E)); bayesNet.probeForNonZeroMasterP(100, random); <<<<<<< BayesianNetwork net = new BayesianNetwork(A.getConnectedGraph()); net.probeForNonZeroMasterP(100); ======= BayesNet net = new BayesNet(A.getConnectedGraph()); net.probeForNonZeroMasterP(100, random); >>>>>>> BayesianNetwork net = new BayesianNetwork(A.getConnectedGraph()); net.probeForNonZeroMasterP(100, random);
<<<<<<< 0.1, fitness ======= 0.2, Arrays.asList(A, B, cObservation, dObservation), Arrays.asList(A, B) >>>>>>> 0.2, fitness <<<<<<< 0.1, fitness ======= 0.2, Arrays.asList(A, B, cObservation, dObservation), Arrays.asList(A, B) >>>>>>> 0.2, fitness <<<<<<< 0.1, fitness ======= 0.2, Arrays.asList(A, B, eObservation, fObservation), Arrays.asList(A, B) >>>>>>> 0.2, fitness
<<<<<<< import org.apache.accumulo.monitor.servlets.ReplicationServlet; ======= import org.apache.accumulo.monitor.servlets.ScanServlet; >>>>>>> import org.apache.accumulo.monitor.servlets.ReplicationServlet; import org.apache.accumulo.monitor.servlets.ScanServlet; <<<<<<< SecurityUtil.serverLogin(SiteConfiguration.getInstance()); VolumeManager fs = VolumeManagerImpl.get(); ======= SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration()); >>>>>>> SecurityUtil.serverLogin(SiteConfiguration.getInstance()); <<<<<<< config = new ServerConfigurationFactory(instance); Accumulo.init(fs, config, "monitor"); ======= config = new ServerConfiguration(instance); Accumulo.init(fs, config, app); >>>>>>> config = new ServerConfigurationFactory(instance); Accumulo.init(fs, config, app);
<<<<<<< import java.util.HashMap; import java.util.Map; import io.improbable.keanu.annotation.ExportVertexToPythonBindings; ======= >>>>>>> import io.improbable.keanu.annotation.ExportVertexToPythonBindings;
<<<<<<< public static void setFromSampleAndCascade(List<? extends Vertex> vertices, Map<String, Long> setAndCascadeCache, Random random) { ======= public static void setFromSampleAndCascade(List<? extends Vertex> vertices, Map<Long, Long> setAndCascadeCache) { >>>>>>> public static void setFromSampleAndCascade(List<? extends Vertex> vertices, Map<Long, Long> setAndCascadeCache, Random random) {
<<<<<<< public TensorGaussianVertex(DoubleTensorVertex mu, DoubleTensorVertex sigma, KeanuRandom random) { this(checkHasSingleNonScalarShapeOrAllScalar(mu.getValue(), sigma.getValue()), mu, sigma, random); } public TensorGaussianVertex(DoubleTensorVertex mu, double sigma, KeanuRandom random) { this(mu, new ConstantTensorVertex(sigma), random); } public TensorGaussianVertex(double mu, DoubleTensorVertex sigma, KeanuRandom random) { this(new ConstantTensorVertex(mu), sigma, random); } public TensorGaussianVertex(double mu, double sigma, KeanuRandom random) { this(new ConstantTensorVertex(mu), new ConstantTensorVertex(sigma), random); } ======= >>>>>>> <<<<<<< public DoubleTensor sample() { return TensorGaussian.sample(getShape(), mu.getValue(), sigma.getValue(), random); ======= public DoubleTensor sample(KeanuRandom random) { return TensorGaussian.sample(getValue().getShape(), mu.getValue(), sigma.getValue(), random); >>>>>>> public DoubleTensor sample(KeanuRandom random) { return TensorGaussian.sample(getShape(), mu.getValue(), sigma.getValue(), random);
<<<<<<< import org.apache.hadoop.hdfs.DFSConfigKeys; ======= import org.apache.hadoop.conf.Configuration; >>>>>>> import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DFSConfigKeys; <<<<<<< public static File testDir; ======= public static TemporaryFolder folder = new TemporaryFolder(); >>>>>>> public static File testDir; <<<<<<< File baseDir = new File(System.getProperty("user.dir") + "/target/mini-tests"); baseDir.mkdirs(); testDir = new File(baseDir, MiniAccumuloClusterTest.class.getName()); FileUtils.deleteQuietly(testDir); testDir.mkdir(); MiniAccumuloConfig config = new MiniAccumuloConfig(testDir, "superSecret").setJDWPEnabled(true); config.setZooKeeperPort(0); HashMap<String,String> site = new HashMap<String,String>(); site.put(Property.TSERV_WORKQ_THREADS.getKey(), "2"); config.setSiteConfig(site); accumulo = new MiniAccumuloCluster(config); ======= folder.create(); accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret"); >>>>>>> File baseDir = new File(System.getProperty("user.dir") + "/target/mini-tests"); baseDir.mkdirs(); testDir = new File(baseDir, MiniAccumuloClusterTest.class.getName()); FileUtils.deleteQuietly(testDir); testDir.mkdir(); MiniAccumuloConfig config = new MiniAccumuloConfig(testDir, "superSecret").setJDWPEnabled(true); config.setZooKeeperPort(0); HashMap<String,String> site = new HashMap<String,String>(); site.put(Property.TSERV_WORKQ_THREADS.getKey(), "2"); config.setSiteConfig(site); accumulo = new MiniAccumuloCluster(config); <<<<<<< Connector conn = accumulo.getConnector("root", "superSecret"); conn.tableOperations().create("table1", true); ======= Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", new PasswordToken("superSecret")); conn.tableOperations().create("table1"); >>>>>>> Connector conn = accumulo.getConnector("root", "superSecret"); conn.tableOperations().create("table1", true); <<<<<<< Connector uconn = accumulo.getConnector("user1", "pass1"); ======= Connector uconn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("user1", new PasswordToken("pass1")); >>>>>>> Connector uconn = accumulo.getConnector("user1", "pass1"); <<<<<<< @Rule public TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target")); ======= >>>>>>> @Rule public TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target")); <<<<<<< Connector conn = accumulo.getConnector("root", "superSecret"); ======= Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", new PasswordToken("superSecret")); >>>>>>> Connector conn = accumulo.getConnector("root", "superSecret"); <<<<<<< File jarFile = folder.newFile("iterator.jar"); ======= File jarFile = File.createTempFile("iterator", ".jar"); >>>>>>> File jarFile = folder.newFile("iterator.jar"); <<<<<<< ======= jarFile.deleteOnExit(); >>>>>>>
<<<<<<< import io.improbable.keanu.algorithms.mcmc.proposal.MHStepVariableSelector; ======= import io.improbable.keanu.algorithms.mcmc.proposal.PriorProposalDistribution; >>>>>>> import io.improbable.keanu.algorithms.mcmc.proposal.MHStepVariableSelector; import io.improbable.keanu.algorithms.mcmc.proposal.PriorProposalDistribution; <<<<<<< import static org.junit.Assert.*; ======= import static org.junit.Assert.assertEquals; >>>>>>> import static org.junit.Assert.assertEquals; <<<<<<< NetworkSamples posteriorSamples = metropolisHastings.getPosteriorSamples( bayesNet, ======= NetworkSamples posteriorSamples = metropolisHastings.getPosteriorSamples( new KeanuProbabilisticModel(bayesNet), >>>>>>> NetworkSamples posteriorSamples = metropolisHastings.getPosteriorSamples( new KeanuProbabilisticModel(bayesNet),
<<<<<<< import io.improbable.keanu.vertices.Observable; import io.improbable.keanu.vertices.Vertex; ======= >>>>>>> import io.improbable.keanu.vertices.Observable; import io.improbable.keanu.vertices.Vertex;
<<<<<<< import io.improbable.keanu.vertices.VertexUnaryOp; ======= import io.improbable.keanu.vertices.SaveParentVertex; >>>>>>> import io.improbable.keanu.vertices.SaveParentVertex; import io.improbable.keanu.vertices.VertexUnaryOp;
<<<<<<< @DisplayInformationForOutput(displayName = "-") public IntegerDifferenceVertex(IntegerVertex a, IntegerVertex b) { super(a, b); ======= public IntegerDifferenceVertex(@LoadParentVertex(LEFT_NAME) IntegerVertex left, @LoadParentVertex(RIGHT_NAME) IntegerVertex right) { super(left, right); >>>>>>> @DisplayInformationForOutput(displayName = "-") public IntegerDifferenceVertex(@LoadParentVertex(LEFT_NAME) IntegerVertex left, @LoadParentVertex(RIGHT_NAME) IntegerVertex right) { super(left, right);
<<<<<<< public AdditionVertex(DoubleVertex left, DoubleVertex right) { super(checkHasOneNonLengthOneShapeOrAllLengthOne(left.getShape(), right.getShape()), left, right); ======= public AdditionVertex(@LoadParentVertex(LEFT_NAME) DoubleVertex left, @LoadParentVertex(RIGHT_NAME) DoubleVertex right) { super(left, right); >>>>>>> public AdditionVertex(@LoadParentVertex(LEFT_NAME) DoubleVertex left, @LoadParentVertex(RIGHT_NAME) DoubleVertex right) { super(checkHasOneNonLengthOneShapeOrAllLengthOne(left.getShape(), right.getShape()), left, right);
<<<<<<< ContinuousDistribution distribution = SmoothUniform.withParameters(min, max, this.edgeSharpness); final DoubleTensor dPdfdx = distribution.dLogProb(value).get(X).getValue(); final DoubleTensor density = distribution.logProb(value); final DoubleTensor dlogPdfdx = dPdfdx.divInPlace(density); ======= final DoubleTensor shoulderWidth = (max.minus(min)).timesInPlace(this.edgeSharpness); final DoubleTensor dPdx = SmoothUniform.dPdf(min, max, shoulderWidth, value); final DoubleTensor density = SmoothUniform.pdf(min, max, shoulderWidth, value); final DoubleTensor dLogPdx = dPdx.divInPlace(density); >>>>>>> ContinuousDistribution distribution = SmoothUniform.withParameters(min, max, this.edgeSharpness); final DoubleTensor dPdx = distribution.dLogProb(value).get(X).getValue(); final DoubleTensor density = distribution.logProb(value); final DoubleTensor dLogPdx = dPdx.divInPlace(density);
<<<<<<< import io.improbable.keanu.vertices.ConstantVertex; import io.improbable.keanu.vertices.LogProbGraph; import io.improbable.keanu.vertices.LogProbGraphContract; import io.improbable.keanu.vertices.LogProbGraphValueFeeder; import io.improbable.keanu.vertices.dbl.DoubleVertex; ======= import io.improbable.keanu.vertices.ConstantVertex; import io.improbable.keanu.vertices.dbl.DoubleVertex; >>>>>>> import io.improbable.keanu.vertices.ConstantVertex; import io.improbable.keanu.vertices.LogProbGraph; import io.improbable.keanu.vertices.LogProbGraphContract; import io.improbable.keanu.vertices.LogProbGraphValueFeeder; import io.improbable.keanu.vertices.dbl.DoubleVertex; <<<<<<< import umontreal.ssj.probdist.TriangularDist; ======= import org.junit.rules.ExpectedException; >>>>>>> import org.junit.rules.ExpectedException; import umontreal.ssj.probdist.TriangularDist; <<<<<<< @Test public void logProbGraphMatchesKnownLogDensityOfVector() { DoubleVertex xMin = ConstantVertex.of(0., 0.); DoubleVertex xMax = ConstantVertex.of(20., 20.); DoubleVertex c = ConstantVertex.of(10., 10.); TriangularVertex triangularVertex = new TriangularVertex(xMin, xMax, c); LogProbGraph logProbGraph = triangularVertex.logProbGraph(); LogProbGraphValueFeeder.feedValue(logProbGraph, xMin, xMin.getValue()); LogProbGraphValueFeeder.feedValue(logProbGraph, xMax, xMax.getValue()); LogProbGraphValueFeeder.feedValue(logProbGraph, c, c.getValue()); LogProbGraphValueFeeder.feedValue(logProbGraph, triangularVertex, DoubleTensor.create(2.5, 7.5)); TriangularDist triangularDist = new TriangularDist(0., 20., 10.); double expectedDensity = Math.log(triangularDist.density(2.5) * triangularDist.density(7.5)); LogProbGraphContract.matchesKnownLogDensity(logProbGraph, expectedDensity); } ======= @Test public void cLessThanXMinThrowsException() { DoubleVertex xMin = ConstantVertex.of(0.); DoubleVertex xMax = ConstantVertex.of(1.); DoubleVertex c = ConstantVertex.of(-1.); TriangularVertex triangularVertex = new TriangularVertex(xMin, xMax, c); thrown.expect(IllegalArgumentException.class); thrown.expectMessage("center must be between xMin and xMax. c: " + c.getValue() + " xMin: " + xMin.getValue() + " xMax: " + xMax.getValue()); triangularVertex.sample(); } @Test public void cGreaterThanXMaxThrowsException() { DoubleVertex xMin = ConstantVertex.of(0.); DoubleVertex xMax = ConstantVertex.of(1.); DoubleVertex c = ConstantVertex.of(2.); TriangularVertex triangularVertex = new TriangularVertex(xMin, xMax, c); thrown.expect(IllegalArgumentException.class); thrown.expectMessage("center must be between xMin and xMax. c: " + c.getValue() + " xMin: " + xMin.getValue() + " xMax: " + xMax.getValue()); triangularVertex.sample(); } @Test public void cEqualToXMinOrXMaxDoesNotThrowException() { DoubleVertex xMin = ConstantVertex.of(0., 0.); DoubleVertex xMax = ConstantVertex.of(1., 1.); DoubleVertex c = ConstantVertex.of(0., 1.); TriangularVertex triangularVertex = new TriangularVertex(xMin, xMax, c); triangularVertex.sample(); } >>>>>>> @Test public void logProbGraphMatchesKnownLogDensityOfVector() { DoubleVertex xMin = ConstantVertex.of(0., 0.); DoubleVertex xMax = ConstantVertex.of(20., 20.); DoubleVertex c = ConstantVertex.of(10., 10.); TriangularVertex triangularVertex = new TriangularVertex(xMin, xMax, c); LogProbGraph logProbGraph = triangularVertex.logProbGraph(); LogProbGraphValueFeeder.feedValue(logProbGraph, xMin, xMin.getValue()); LogProbGraphValueFeeder.feedValue(logProbGraph, xMax, xMax.getValue()); LogProbGraphValueFeeder.feedValue(logProbGraph, c, c.getValue()); LogProbGraphValueFeeder.feedValue(logProbGraph, triangularVertex, DoubleTensor.create(2.5, 7.5)); TriangularDist triangularDist = new TriangularDist(0., 20., 10.); double expectedDensity = Math.log(triangularDist.density(2.5) * triangularDist.density(7.5)); LogProbGraphContract.matchesKnownLogDensity(logProbGraph, expectedDensity); } @Test public void cLessThanXMinThrowsException() { DoubleVertex xMin = ConstantVertex.of(0.); DoubleVertex xMax = ConstantVertex.of(1.); DoubleVertex c = ConstantVertex.of(-1.); TriangularVertex triangularVertex = new TriangularVertex(xMin, xMax, c); thrown.expect(IllegalArgumentException.class); thrown.expectMessage("center must be between xMin and xMax. c: " + c.getValue() + " xMin: " + xMin.getValue() + " xMax: " + xMax.getValue()); triangularVertex.sample(); } @Test public void cGreaterThanXMaxThrowsException() { DoubleVertex xMin = ConstantVertex.of(0.); DoubleVertex xMax = ConstantVertex.of(1.); DoubleVertex c = ConstantVertex.of(2.); TriangularVertex triangularVertex = new TriangularVertex(xMin, xMax, c); thrown.expect(IllegalArgumentException.class); thrown.expectMessage("center must be between xMin and xMax. c: " + c.getValue() + " xMin: " + xMin.getValue() + " xMax: " + xMax.getValue()); triangularVertex.sample(); } @Test public void cEqualToXMinOrXMaxDoesNotThrowException() { DoubleVertex xMin = ConstantVertex.of(0., 0.); DoubleVertex xMax = ConstantVertex.of(1., 1.); DoubleVertex c = ConstantVertex.of(0., 1.); TriangularVertex triangularVertex = new TriangularVertex(xMin, xMax, c); triangularVertex.sample(); }
<<<<<<< import static io.improbable.keanu.tensor.TensorShapeValidation.checkHasOneNonLengthOneShapeOrAllLengthOne; ======= @DisplayInformationForOutput(displayName = "-") >>>>>>> import static io.improbable.keanu.tensor.TensorShapeValidation.checkHasOneNonLengthOneShapeOrAllLengthOne; @DisplayInformationForOutput(displayName = "-")
<<<<<<< protected DualNumber calculateDualNumber(Map<Vertex<?>, DualNumber> dualNumbers) { ======= public DualNumber calculateDualNumber(Map<Vertex, DualNumber> dualNumbers) { >>>>>>> public DualNumber calculateDualNumber(Map<Vertex<?>, DualNumber> dualNumbers) {
<<<<<<< import io.improbable.keanu.algorithms.variational.optimizer.*; import io.improbable.keanu.tensor.dbl.DoubleTensor; import io.improbable.keanu.util.ProgressBar; ======= import io.improbable.keanu.algorithms.variational.optimizer.Optimizer; import io.improbable.keanu.algorithms.variational.optimizer.ProbabilisticWithGradientGraph; import io.improbable.keanu.util.status.StatusBar; >>>>>>> import io.improbable.keanu.algorithms.variational.optimizer.*; import io.improbable.keanu.algorithms.variational.optimizer.Optimizer; import io.improbable.keanu.algorithms.variational.optimizer.ProbabilisticWithGradientGraph; import io.improbable.keanu.tensor.dbl.DoubleTensor; import io.improbable.keanu.util.status.StatusBar; <<<<<<< fitnessFunctionGradient = new LogProbFitnessFunctionGradient( probabilisticWithGradientGraph, this::handleGradientCalculation ); } ======= StatusBar statusBar = Optimizer.createFitnessStatusBar(this); >>>>>>> fitnessFunctionGradient = new LogProbFitnessFunctionGradient( probabilisticWithGradientGraph, this::handleGradientCalculation ); } <<<<<<< progressBar.finish(); return result; ======= statusBar.finish(); return pointValuePair.getValue(); >>>>>>> statusBar.finish(); return result;
<<<<<<< import io.improbable.keanu.algorithms.variational.optimizer.*; ======= import io.improbable.keanu.algorithms.ProbabilisticModel; import io.improbable.keanu.algorithms.Variable; >>>>>>> import io.improbable.keanu.algorithms.ProbabilisticModel; import io.improbable.keanu.algorithms.Variable; import io.improbable.keanu.algorithms.VariableReference; import io.improbable.keanu.algorithms.variational.optimizer.FitnessFunction; import io.improbable.keanu.algorithms.variational.optimizer.OptimizedResult; <<<<<<< import io.improbable.keanu.algorithms.variational.optimizer.ProbabilisticGraph; import io.improbable.keanu.algorithms.variational.optimizer.Variable; import io.improbable.keanu.tensor.dbl.DoubleTensor; ======= >>>>>>> import io.improbable.keanu.tensor.dbl.DoubleTensor; <<<<<<< OptimizedResult result = nonGradientOptimizationAlgorithm.optimize(latentVariables, fitnessFunction); ======= ApacheMathSimpleBoundsCalculator boundsCalculator = new ApacheMathSimpleBoundsCalculator(boundsRange, optimizerBounds); SimpleBounds bounds = boundsCalculator.getBounds(probabilisticModel.getLatentVariables(), startPoint); PointValuePair pointValuePair = optimizer.optimize( new MaxEval(maxEvaluations), new ObjectiveFunction(fitnessFunction.fitness()), bounds, MAXIMIZE, new InitialGuess(startPoint) ); >>>>>>> OptimizedResult result = nonGradientOptimizationAlgorithm.optimize(latentVariables, fitnessFunction); <<<<<<< public NonGradientOptimizerBuilder bayesianNetwork(ProbabilisticGraph probabilisticGraph) { this.probabilisticGraph = probabilisticGraph; ======= public NonGradientOptimizerBuilder probabilisticModel(ProbabilisticModel probabilisticModel) { this.probabilisticModel = probabilisticModel; >>>>>>> public NonGradientOptimizerBuilder probabilisticModel(ProbabilisticModel probabilisticModel) { this.probabilisticModel = probabilisticModel; <<<<<<< probabilisticGraph, nonGradientOptimizationAlgorithm, checkInitialFitnessConditions ======= probabilisticModel, maxEvaluations, boundsRange, optimizerBounds, initialTrustRegionRadius, stoppingTrustRegionRadius >>>>>>> probabilisticModel, nonGradientOptimizationAlgorithm, checkInitialFitnessConditions <<<<<<< ======= public String toString() { return "NonGradientOptimizer.NonGradientOptimizerBuilder(probabilisticModel=" + this.probabilisticModel + ", maxEvaluations=" + this.maxEvaluations + ", boundsRange=" + this.boundsRange + ", optimizerBounds=" + this.optimizerBounds + ", initialTrustRegionRadius=" + this.initialTrustRegionRadius + ", stoppingTrustRegionRadius=" + this.stoppingTrustRegionRadius + ")"; } >>>>>>>
<<<<<<< import io.improbable.keanu.vertices.Vertex; import io.improbable.keanu.vertices.VertexBinaryOp; import io.improbable.keanu.vertices.dbl.Differentiable; ======= >>>>>>> import io.improbable.keanu.vertices.VertexBinaryOp; <<<<<<< public abstract class DoubleBinaryOpVertex extends DoubleVertex implements Differentiable, NonProbabilistic<DoubleTensor>, VertexBinaryOp<DoubleVertex, DoubleVertex> { ======= public abstract class DoubleBinaryOpVertex extends DoubleVertex implements NonProbabilistic<DoubleTensor> { >>>>>>> public abstract class DoubleBinaryOpVertex extends DoubleVertex implements NonProbabilistic<DoubleTensor>, VertexBinaryOp<DoubleVertex, DoubleVertex> { <<<<<<< @Override public PartialDerivative forwardModeAutoDifferentiation(Map<Vertex, PartialDerivative> derivativeOfParentsWithRespectToInput) { try { return forwardModeAutoDifferentiation( derivativeOfParentsWithRespectToInput.getOrDefault(left, PartialDerivative.EMPTY), derivativeOfParentsWithRespectToInput.getOrDefault(right, PartialDerivative.EMPTY) ); } catch (UnsupportedOperationException e) { return Differentiable.super.forwardModeAutoDifferentiation(derivativeOfParentsWithRespectToInput); } } ======= >>>>>>>
<<<<<<< public static List<String> bulkLoad(ServerContext context, long tid, String tableId, List<String> files, boolean setTime) throws IOException { AssignmentStats stats = new BulkImporter(context, tid, tableId, setTime).importFiles(files); ======= public static List<String> bulkLoad(ClientContext context, long tid, String tableId, List<String> files, String errorDir, boolean setTime) throws IOException, AccumuloException, AccumuloSecurityException, ThriftTableOperationException { AssignmentStats stats = new BulkImporter(context, tid, tableId, setTime).importFiles(files, new Path(errorDir)); >>>>>>> public static List<String> bulkLoad(ServerContext context, long tid, String tableId, List<String> files, boolean setTime) throws IOException { AssignmentStats stats = new BulkImporter(context, tid, tableId, setTime).importFiles(files); <<<<<<< final Map<Path,List<KeyExtent>> completeFailures = Collections .synchronizedSortedMap(new TreeMap<>()); ======= final Map<Path,List<KeyExtent>> completeFailures = Collections.synchronizedSortedMap(new TreeMap<Path,List<KeyExtent>>()); >>>>>>> final Map<Path,List<KeyExtent>> completeFailures = Collections.synchronizedSortedMap(new TreeMap<>()); <<<<<<< final Map<Path,List<TabletLocation>> assignments = Collections .synchronizedSortedMap(new TreeMap<>()); ======= final Map<Path,List<TabletLocation>> assignments = Collections.synchronizedSortedMap(new TreeMap<Path,List<TabletLocation>>()); >>>>>>> final Map<Path,List<TabletLocation>> assignments = Collections.synchronizedSortedMap(new TreeMap<>()); <<<<<<< final Map<Path,List<AssignmentInfo>> ais = Collections.synchronizedMap(new TreeMap<>()); ======= final Map<Path,List<AssignmentInfo>> ais = Collections.synchronizedMap(new TreeMap<Path,List<AssignmentInfo>>()); >>>>>>> final Map<Path,List<AssignmentInfo>> ais = Collections.synchronizedMap(new TreeMap<>()); <<<<<<< Map<Path,List<AssignmentInfo>> assignInfo = estimateSizes(fs, assignments, paths, numMapThreads); ======= Map<Path,List<AssignmentInfo>> assignInfo = estimateSizes(context.getConfiguration(), conf, fs, assignments, paths, numMapThreads); >>>>>>> Map<Path,List<AssignmentInfo>> assignInfo = estimateSizes(fs, assignments, paths, numMapThreads); <<<<<<< Map<Path,List<KeyExtent>> assignmentFailures = Collections.synchronizedMap(new TreeMap<>()); ======= Map<Path,List<KeyExtent>> assignmentFailures = Collections.synchronizedMap(new TreeMap<Path,List<KeyExtent>>()); >>>>>>> Map<Path,List<KeyExtent>> assignmentFailures = Collections.synchronizedMap(new TreeMap<>()); <<<<<<< HashMap<KeyExtent,Map<String,org.apache.accumulo.core.dataImpl.thrift.MapFileInfo>> files = new HashMap<>(); ======= HashMap<KeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files = new HashMap<>(); >>>>>>> HashMap<KeyExtent,Map<String,org.apache.accumulo.core.dataImpl.thrift.MapFileInfo>> files = new HashMap<>(); <<<<<<< HashMap<String,org.apache.accumulo.core.dataImpl.thrift.MapFileInfo> tabletFiles = new HashMap<>(); ======= HashMap<String,org.apache.accumulo.core.data.thrift.MapFileInfo> tabletFiles = new HashMap<>(); >>>>>>> HashMap<String,org.apache.accumulo.core.dataImpl.thrift.MapFileInfo> tabletFiles = new HashMap<>(); <<<<<<< // @formatter:off org.apache.accumulo.core.dataImpl.thrift.MapFileInfo mfi = new org.apache.accumulo.core.dataImpl.thrift.MapFileInfo(pathSize.estSize); // @formatter:on ======= org.apache.accumulo.core.data.thrift.MapFileInfo mfi = new org.apache.accumulo.core.data.thrift.MapFileInfo(pathSize.estSize); >>>>>>> org.apache.accumulo.core.dataImpl.thrift.MapFileInfo mfi = new org.apache.accumulo.core.dataImpl.thrift.MapFileInfo(pathSize.estSize); <<<<<<< try (FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder() .forFile(filename, fs, fs.getConf(), context.getCryptoService()) .withTableConfiguration(context.getConfiguration()).seekToBeginning().build()) { ======= FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder().forFile(filename, fs, fs.getConf()) .withTableConfiguration(context.getConfiguration()).seekToBeginning().build(); try { >>>>>>> try (FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder() .forFile(filename, fs, fs.getConf(), context.getCryptoService()) .withTableConfiguration(context.getConfiguration()).seekToBeginning().build()) {
<<<<<<< import io.improbable.keanu.vertices.bool.nonprobabilistic.PlaceHolderBoolVertex; import io.improbable.keanu.vertices.dbl.Differentiable; ======= >>>>>>>
<<<<<<< import io.improbable.keanu.distributions.dual.Diffs; ======= import io.improbable.keanu.tensor.TensorShape; >>>>>>> import io.improbable.keanu.distributions.dual.Diffs; import io.improbable.keanu.tensor.TensorShape; <<<<<<< ======= import java.util.Map; import static io.improbable.keanu.tensor.TensorShape.shapeToDesiredRankByPrependingOnes; import static io.improbable.keanu.tensor.TensorShapeValidation.checkHasSingleNonScalarShapeOrAllScalar; import static io.improbable.keanu.tensor.TensorShapeValidation.checkTensorsMatchNonScalarShapeOrAreScalar; >>>>>>> import static io.improbable.keanu.tensor.TensorShape.shapeToDesiredRankByPrependingOnes; import static io.improbable.keanu.tensor.TensorShapeValidation.checkHasSingleNonScalarShapeOrAllScalar; import static io.improbable.keanu.tensor.TensorShapeValidation.checkTensorsMatchNonScalarShapeOrAreScalar; <<<<<<< Diffs dlnP = Laplace.withParameters(mu.getValue(), beta.getValue()).dLogProb(value); return convertDualNumbersToDiff(dlnP.get(MU).getValue(), dlnP.get(BETA).getValue(), dlnP.get(X).getValue()); ======= Laplace.DiffLogP dlnPdf = Laplace.dlnPdf(mu.getValue(), beta.getValue(), value); return convertDualNumbersToDiff(dlnPdf.dLogPdmu, dlnPdf.dLogPdbeta, dlnPdf.dLogPdx); >>>>>>> Diffs dlnP = Laplace.withParameters(mu.getValue(), beta.getValue()).dLogProb(value); return convertDualNumbersToDiff(dlnP.get(MU).getValue(), dlnP.get(BETA).getValue(), dlnP.get(X).getValue());