Iterator of :class:`stravalib.model.Activty` objects for activities matched as
        with this activity.
965928
def related(self):
        
        if self._related is None:
            if self.athlete_count - 1 > 0:
                self.assert_bind_client()
                self._related = self.bind_client.get_related_activities(self.id)
            else:
                self._related = []
        return self._related
1275326
private void readActivityCodes(Task task, List<CodeAssignmentType> codes)
   {
      for (CodeAssignmentType assignment : codes)
      {
         ActivityCodeValue code = m_activityCodeMap.get(Integer.valueOf(assignment.getValueObjectId()));
         if (code != null)
         {
            task.addActivityCode(code);
         }
      }
   }
60458
function getActivity(activityId) {
  var activity = activities[activityId];

  if (activity === undefined) {
    throw new Error('activity with id "' + activityId + '" not found.');
  }

  return activity;
}
668349
public static activity_status[] get(nitro_service client) throws Exception
	{
		activity_status resource = new activity_status();
		resource.validate("get");
		return (activity_status[]) resource.get_resources(client);
	}
109287
def _verb(self, verb):
        

        activity = {
            "verb": verb,
            "object": {
                "id": self.id,
                "objectType": self.object_type,
            }
        }

        self._post_activity(activity)
221617
public Activity checkActivityLabel()
	{
		boolean active = false;
		boolean inactive = false;

		for (PhysicalEntity pe : pes)
		{
			for (Object o : PE2TERM.getValueFromBean(pe))
			{
				String s = (String) o;
				if (s.contains("inactiv")) inactive = true;
				else if (s.contains("activ")) active = true;
			}

			for (String s : pe.getName())
			{
				if (s.contains("inactiv")) inactive = true;
				else if (s.contains("activ")) active = true;
			}
		}

		if (active) if (inactive) return Activity.BOTH; else return Activity.ACTIVE;
		else if (inactive) return Activity.INACTIVE; else return Activity.NONE;
	}
117484
def _activity_helper(modifier: str, location=None):
    
    rv = {MODIFIER: modifier}

    if location:
        rv[LOCATION] = location

    return rv
1257899
def get_main_activity(self):
        
        activities = self.get_main_activities()
        if len(activities) > 0:
            return self._format_value(activities.pop())
        return None
1339902
public void executeActivitiesConcurrent(List<PvmActivity> activityStack, PvmActivity targetActivity,
                                          PvmTransition targetTransition, Map<String, Object> variables, Map<String, Object> localVariables,
                                          boolean skipCustomListeners, boolean skipIoMappings) {


    ScopeImpl flowScope = null;
    if (!activityStack.isEmpty()) {
      flowScope = activityStack.get(0).getFlowScope();
    } else if (targetActivity != null) {
      flowScope = targetActivity.getFlowScope();
    } else if (targetTransition != null) {
      flowScope = targetTransition.getSource().getFlowScope();
    }

    PvmExecutionImpl propagatingExecution = null;
    if (flowScope.getActivityBehavior() instanceof ModificationObserverBehavior) {
      ModificationObserverBehavior flowScopeBehavior = (ModificationObserverBehavior) flowScope.getActivityBehavior();
      propagatingExecution = (PvmExecutionImpl) flowScopeBehavior.createInnerInstance(this);
    } else {
      propagatingExecution = createConcurrentExecution();
    }

    propagatingExecution.executeActivities(activityStack, targetActivity, targetTransition, variables, localVariables,
      skipCustomListeners, skipIoMappings);
  }
79639
def activity_list(date, sort, limit)
      date_param = format_date(date)
      if sort == "asc"
        date_param = "afterDate=#{date_param}"
      elsif sort == "desc"
        date_param = "beforeDate=#{date_param}"
      else
        raise FitgemOauth2::InvalidArgumentError, "sort can either be asc or desc"
      end
      get_call("user/#{user_id}/activities/list.json?offset=0&limit=#{limit}&sort=#{sort}&#{date_param}")
    end
217049
private boolean getActivityImplicity(final ACTIVITY activity) {
        if (this.activity == ACTIVITY.ALL) {
            return true;
        }

        if ((activity == ACTIVITY.SUBSCRIBE) && (this.activity == ACTIVITY.PUBLISH)) {
            return false;
        } else if ((activity == ACTIVITY.PUBLISH) && (this.activity == ACTIVITY.SUBSCRIBE)) {
            return false;
        } else if (activity == ACTIVITY.ALL && this.getActivity() != ACTIVITY.ALL) {
            return false;
        }
        return true;
    }
736754
public Activity getActivityVO(Long pWorkId) {
         if(this.activities == null){
            return null;
        }
        for(int i=0; i<activities.size(); i++){
            if(pWorkId.longValue() == activities.get(i).getId().longValue()){
                return activities.get(i);
            }
        }
        return null;

    }
334461
private static Map<String, Object> getActivity(Replication replicator) {
        // For schema, see http://wiki.apache.org/couchdb/HttpGetActiveTasks
        Map<String, Object> activity = new HashMap<String, Object>();

        String source = replicator.getRemoteUrl().toExternalForm();
        String target = replicator.getLocalDatabase().getName();

        if (!replicator.isPull()) {
            String tmp = source;
            source = target;
            target = tmp;
        }
        int processed = replicator.getCompletedChangesCount();
        int total = replicator.getChangesCount();
        String status = String.format(Locale.ENGLISH, "Processed %d / %d changes", processed, total);
        if (!replicator.getStatus().equals(ReplicationStatus.REPLICATION_ACTIVE)) {
            //These values match the values for IOS.
            if (replicator.getStatus().equals(ReplicationStatus.REPLICATION_IDLE)) {
                status = "Idle";     // nonstandard
            } else if (replicator.getStatus().equals(ReplicationStatus.REPLICATION_STOPPED)) {
                status = "Stopped";
            } else if (replicator.getStatus().equals(ReplicationStatus.REPLICATION_OFFLINE)) {
                status = "Offline";  // nonstandard
            }
        }
        int progress = (total > 0) ? (int) 100 * processed / total : 0;

        activity.put("type", "Replication");
        activity.put("task", replicator.getSessionID());
        activity.put("source", source);
        activity.put("target", target);
        activity.put("status", status);
        activity.put("progress", progress);
        activity.put("continuous", replicator.isContinuous());

        //NOTE: Need to support "x_active_requests"

        if (replicator.getLastError() != null) {
            String msg = String.format(Locale.ENGLISH, "Replicator error: %s.  Repl: %s.  Source: %s, Target: %s",
                    replicator.getLastError(), replicator, source, target);
            Log.w(TAG, msg);
            Throwable error = replicator.getLastError();
            int statusCode = 400;
            if (error instanceof RemoteRequestResponseException) {
                statusCode = ((RemoteRequestResponseException) error).getCode();
            }
            Object[] errorObjects = new Object[]{statusCode, replicator.getLastError().toString()};
            activity.put("error", errorObjects);
        } else {
            // NOTE: Following two parameters: CBL iOS does not support. We might remove them in the future.
            activity.put("change_count", total);
            activity.put("completed_change_count", processed);
        }

        return activity;
    }
997049
public Set<String> getActivitiesWithRoutingConstraints(){
		Set<String> result = new HashSet<>();
		String propertyValue = getProperty(ConstraintContextProperty.ACTIVITIES_WITH_CONSTRAINTS);
		if(propertyValue == null)
			return result;
		StringTokenizer activityTokens = StringUtils.splitArrayString(propertyValue, " ");
		while(activityTokens.hasMoreTokens()){
			result.add(activityTokens.nextToken());
		}
		return result;
	}
519046
public ApiResponse postUserActivity(String verb, String title,
            String content, String category, User user, Entity object,
            String objectType, String objectName, String objectContent) {
        Activity activity = Activity.newActivity(verb, title, content,
                category, user, object, objectType, objectName, objectContent);
        return postUserActivity(user.getUuid().toString(), activity);
    }
613673
public Object getActivity(ActivityHandle ah) {
	    if (tracer.isFineEnabled()) {
	    	tracer.fine("get Activity with ActivityHandle "+ah.toString());
	    }
	    // if handle exists then recreate activity
	    return activities.get(ah);
	}
1261558
private void populateActivityCodes(Task task)
   {
      List<Integer> list = m_activityCodeAssignments.get(task.getUniqueID());
      if (list != null)
      {
         for (Integer id : list)
         {
            ActivityCodeValue value = m_activityCodeMap.get(id);
            if (value != null)
            {
               task.addActivityCode(value);
            }
         }
      }
   }