working on it ...

Filters

Explore Public Snippets

Sort by

Found 4,265 snippets matching: activity

    public by lbottaro  529690  10  8  0

    How to get the list of all the activities comparing two UCM streams in python

    This script shows how to get the list of all the activities comparing two ucm streams. The command returns a list object you can easily loop and print.
    import os
    
    bl_old="myOldBaseline@/MyVobs"
    bl_new="myNewBaseline@/MyVobs"
    myView = "MyView"
    
    diff_act=os.popen("cleartool setview -exec \"cleartool diffbl -nmerge -activities "+bl_old+" "+ bl_new+" \" " +myView).readlines()
    
    for act in diff_act:
      print ("ACTIVITY: "+str(act))
    

    public by lbottaro  7245  4  7  0

    Make UCM clearcase activity using cleartool command

    Here are some examples on how to make, create and set activity in IBM Clearcase UCM environment, using cleartool mkact command. Source: http://www.ipnom.com/ClearCase-Commands/mkactivity.html
    # Create an activity, but do not set it to be the current activity for the view.
    # User is prompted to proceed 
    cleartool mkact –nset 
    Create activity with automatically generated name?  [yes] yes
    Created activity "activity990917.133218".
    
    # Create and set an activity attached to the current view.
    cleartool mkact new_activity 
    Created activity "new_activity".
    Set activity "new_activity" in view "java_int".
    
    # Create and set an activity whose name is generated automatically. 
    # User is not prompted for confirmation.
    cleartool mkact -f 
    Created activity "activity990917.134751".
    Set activity "activity990917.134751" in view "java_int".
    
    # Create and set an activity with the headline “Create directories”.
    cleartool mkactivity -headline "Create directories" create_directories 
    Created activity "create_directories". 
    Set activity "create_directories" in view "webo_integ".

    public by Tech_JA  2273  0  6  0

    Open new activity

    Intent i = new Intent(getApplicationContext(), nextscreen.class);
    StartActivity(i);

    public by rsrini7  2027  1  3  0

    Arduino Ubuntu - one time activity to avoid repeated chmod of ttyACM*

    Arduino Ubuntu - one time activity to avoid repeated chmod of ttyACM*: Arduino_Ubuntu_sh
    sudo gpasswd -a <user> dialout
    sudo chmod a+rw /dev/ttyACM*
    
    

    public by hoseinquest  1767  0  5  0

    android close keybiard at activity start

    getWindow().setSoftInputMode(
                    WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);

    public by pradithya  376  1  4  0

    Launching Activity View Controller

    let image = UIImage()
    let viewController = UIActivityViewController(activityItems:[image], applicationActivities: nil)
    self.present(viewController, animated:true, completion: nil);
    						

    public by lbottaro  14523  56  8  0

    How to list files changed in clearcase ucm stream activities

    This script lists the files changed in all the activities delivered on a specific stream, with no duplicates. The stream is the one currently set on the clearcase view.
    #!/usr/bin/tcsh -f
    # This script lists the activities of a stream and saves on the following file the changed files without duplicates.
    
    set tmpoutput = "$HOME/.tmp_AllChangedFilesInStream.txt"
    set output = "$HOME/AllChangedFilesInStream.txt"
    rm -rf $tmpoutput
    touch $tmpoutput
    rm -rf $output
    touch $output
    
    foreach act ( `cleartool lsact -s | grep -v rebase` )	
        set changeset = `cleartool lsact -fmt "%[versions]p" $act`
        echo $changeset | tr ' ' '\n' >> $tmpoutput
    end
    
    foreach line ( "`cat $tmpoutput`" )	
        set file=`echo $line | sed -e "s|\(.*\)@@.*|\1|"`
        
        set isPresent = `grep "$file" "$output"`
        if ("$isPresent" == "") then
          echo $file >> $output
        endif  
    end
    
    rm -rf $tmpoutput
    
    exit 0

    public by msdn  120574  0  6  0

    GetActivity: Returns the requested activity from the cache. If not found, loads the activity from the supplied path, caches it and returns the activity.

    Returns the requested activity from the cache. If not found, loads the activity from the supplied path, caches it and returns the activity. The path which is the unique identifier of the required activity. The requested activity.
    /// <summary>
    /// A thread safe dictionary holding DynamicActivity instances keyed by their file path (environment vars unresolved).
    /// </summary>
    private static IDictionary<string, DynamicActivity> activityDictionary = new ThreadSafeDictionary<string, DynamicActivity>();
    
    /// <summary>
    /// Returns the requested activity from the cache. If not found, loads the activity from the supplied path, caches it and returns the activity.
    /// </summary>
    /// <param name="path">The path which is the unique identifier of the required activity.</param>
    /// <returns>The requested activity.</returns>
    public static DynamicActivity GetActivity(string path)
    {
        DynamicActivity dynamicActivity = null;
        if (!activityDictionary.TryGetValue(path, out dynamicActivity))
        {
            dynamicActivity = ActivityXamlServices.Load(ReplaceEnvironmentVariables(path)) as DynamicActivity;
            activityDictionary[path] = dynamicActivity;
        }
    
        return dynamicActivity;
    }

    public by msdn  1527  0  7  0

    ExtractIconResource: Loads the standard activity icons from System.Activities.Presentation. Accepts various forms of input including 'short name' i.e. toolbox idsplay name, and 'Type.FullName' - and tries to fix them automatically.

    Loads the standard activity icons from System.Activities.Presentation. Accepts various forms of input including 'short name' i.e. toolbox idsplay name, and 'Type.FullName' - and tries to fix them automatically.
    static ResourceDictionary iconsDict;
    
    /// <summary>
    /// Loads the standard activity icons from System.Activities.Presentation.
    /// Accepts various forms of input including 'short name' i.e. toolbox idsplay name, and 'Type.FullName' - and tries to fix them automatically.
    /// </summary>
    public static object ExtractIconResource(string iconOrtypeName)
    {
        if (iconsDict == null)
        {
            iconsDict = new ResourceDictionary
            {
                Source = new Uri("pack://application:,,,/System.Activities.Presentation;component/themes/icons.xaml")
            };
    
            ResourceDictionary md = new ResourceDictionary
            {
                Source = new Uri("pack://application:,,,/System.Activities.Presentation;component/themes/icons.default.xaml")
            };
            iconsDict.MergedDictionaries.Add(md);
        }
    
        string resourceKey = GetResourceName(iconOrtypeName);
        object resource = iconsDict.Contains(resourceKey) ? iconsDict[resourceKey] : null;
    
        if (!(resource is DrawingBrush))
        {
            resource = iconsDict["GenericLeafActivityIcon"];
        }
    
        return resource;
    }

    public by msdn  1341  0  6  0

    GetActivityData: Converts the collection of activity data items into a flat array.

    Converts the collection of activity data items into a flat array. The activity supplying data items. An array containing activity item names and their values or a null reference if the specified activity doesn't contain any data items.
    /// <summary>
    /// Converts the collection of activity data items into a flat array.
    /// </summary>
    /// <param name="activity">The activity supplying data items.</param>
    /// <returns>An array containing activity item names and their values or a null reference if the specified activity doesn't contain any data items.</returns>
    public static object[] GetActivityData(ActivityBase activity)
    {
        Guard.ArgumentNotNull(activity, "activity");
    
        IDictionary<string, object> activityData = activity.ActivityData;
    
        if (activityData != null)
        {
            ArrayList props = new ArrayList(activityData.Count * 2);
    
            foreach (KeyValuePair<string, object> activityItem in activityData)
            {
                props.Add(activityItem.Key);
                props.Add(activityItem.Value);
            }
    
            return props.ToArray();
        }
        else
        {
            return null;
        }
    }
    • Public Snippets
    • Channels Snippets