working on it ...

Filters

Explore Public Snippets

Sort by

Found 3,703 snippets matching: activities

    public by lbottaro  529697  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  14528  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 cghersi @ Snip2CodeDev  1914  0  6  4

    Snip2Code Value Proposition

    Here there's a depict of how Snip2Code could help companies in improving their performance in the software development activities
    public static void checkEfficiency() {		
    	//let the company adopt Snip2Code:
    	Company acme = new Company(Goal.FASTER_TIME_TO_MARKET);
    	acme.adoptSnip2Code();
    	
    	//check how a coder become more efficient with the use of Snip2Code tools:
    	Coder alice = acme.getCoder();
    	Results[] aliceResults = alice.getOptimizations();
    	
    	//check results:
    	if ((aliceResults[0] == Results.EFFICIENT_CODE_FIND) &&
    		(aliceResults[1] == Results.REUSE_CODE) &&
    		(aliceResults[2] == Results.PRESERVE_KNOWLEDGE) &&
    		(aliceResults[3] == Results.SHARE_KNOWLEDGE)) {
    		
    		print("Yes, this is what you can get from Snip2Code!");			
    	} else {			
    		print("This is not an option!");			
    	}
    }

    public by msdn  1457  0  6  0

    LoadToolboxSecurityCategory: Get the security releated activities

    Get the security releated activities
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Activities.Presentation;
    using System.Activities.Presentation.Toolbox;
    using System.IO;
    using System.Windows;
    using System.Windows.Forms;
    using System.Reflection;
    using System.Configuration;
    
    /// <summary>
    /// Get the security releated activities
    /// </summary>
    private static ToolboxCategory LoadToolboxSecurityCategory()
    {
        ToolboxCategory toolBoxSecurity = new ToolboxCategory("Security");
    
        try
        {
            foreach (Type type in typeof(Microsoft.Activities.SecurityPack.PrincipalPermissionScope).Assembly.GetTypes().Where(t => t.Namespace == "Microsoft.Activities.SecurityPack" &&
                typeof(System.Activities.Activity).IsAssignableFrom(t) &&
                t.IsVisible && !t.IsAbstract
                ))
            {
    
                ToolboxItemWrapper item = new ToolboxItemWrapper(type, type.Name);
                item.DisplayName = item.DisplayName.Replace("`1", " <T>");
                toolBoxSecurity.Add(item);
            }
        }
        catch { }
    
        return toolBoxSecurity;
    }

    public by msdn  879  0  6  0

    CopyCustomActivitiesToProjectBinDirectory: Copies the custom activities to the project bin folder

    Copies the custom activities to the project bin folder
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.IO;
    using System.Windows.Forms;
    
    /// <summary>
    /// Copies the custom activities to the project bin folder
    /// </summary>
    /// <param name="projectPath"></param>
    public static void CopyCustomActivitiesToProjectBinDirectory(string projectPath)
    {
        string customActivityFolder = System.IO.Path.Combine(Directory.GetCurrentDirectory(), @"Assemblies\Activity");
        string[] customActivityList = FileUtils.GetFolderContentsAndPath(customActivityFolder, "*.dll", SearchOption.TopDirectoryOnly);
    
        foreach (string file in customActivityList)
        {
            CopyFileToProjectBinDirectory(file, projectPath);
        }
    }

    public by msdn  1528  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  1311  0  6  0

    LoadToolboxIconsForBuiltInActivities: The load toolbox icons for built in activities.

    The load toolbox icons for built in activities.
    /// <summary>
    /// The load toolbox icons for built in activities.
    /// </summary>
    private static void LoadToolboxIconsForBuiltInActivities()
    {
        try
        {
            var sourceAssembly = Assembly.LoadFrom(@"Lib\Microsoft.VisualStudio.Activities.dll");
    
            var builder = new AttributeTableBuilder();
    
            if (sourceAssembly != null)
            {
                var stream =
                    sourceAssembly.GetManifestResourceStream(
                        "Microsoft.VisualStudio.Activities.Resources.resources");
                if (stream != null)
                {
                    var resourceReader = new ResourceReader(stream);
    
                    foreach (var type in
                        typeof(Activity).Assembly.GetTypes().Where(
                            t => t.Namespace == "System.Activities.Statements"))
                    {
                        CreateToolboxBitmapAttributeForActivity(builder, resourceReader, type);
                    }
                }
            }
    
            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
        catch (FileNotFoundException)
        {
            // Ignore - will use default icons
        }
    }

    public by msdn  1204  1  6  0

    LoadToolboxCategoryService: Get the service related activities.

    Get the service related activities.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Activities.Presentation;
    using System.Activities.Presentation.Toolbox;
    using System.IO;
    using System.Windows;
    using System.Windows.Forms;
    using System.Reflection;
    using System.Configuration;
    
    /// <summary>
    /// Get the service related activities.
    /// </summary>
    private static ToolboxCategory LoadToolboxCategoryService()
    {
        ToolboxCategory toolBoxServices = new ToolboxCategory("Services");
        string[] filteredListServices = new string[] { "Send", "SendReply", "Receive", "ReceiveReply", "CorrelationScope", "InitializeCorrelation", "TransactedReceiveScope" };
    
        foreach (Type type in typeof(System.ServiceModel.Activities.WorkflowService).Assembly.GetTypes().Where(t => t.Namespace == "System.ServiceModel.Activities" &&
            typeof(System.Activities.Activity).IsAssignableFrom(t) &&
            t.IsVisible
            ))
        {
    
            //find any Control Flow activites
            if (filteredListServices.Contains(type.Name))
            {
                ToolboxItemWrapper item = new ToolboxItemWrapper(type, type.Name);
                item.DisplayName = item.DisplayName.Replace("`1", " <T>");
                toolBoxServices.Add(item);
            }
        }
    
        return toolBoxServices;
    }

    external by Umar  57  0  1  0

    Normally when we launch new activity, it’s previous activities will be kept in a queue like a stack of activities. So if you want to kill all the previous activities, just follow these methods.

    Normally when we launch new activity, it’s previous activities will be kept in a queue like a stack of activities. So if you want to kill all the previous activities, just follow these methods.: Clear All Activity Stack In Android
    Intent i = new Intent(OldActivity.this, NewActivity.class);
    // set the new task and clear flags
    i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
    startActivity(i);
    
    

    external by Github  138  0  2  0

    I'd like , please <a href=" http://www.rightside.com.au/out-of-pocket-cost-for-drugs.pdf ">best drugs for neck pain</a> Putin has said Snowden must stop anti-U.S. activities. Snowden has said he does not regard his activities as hostile to the United ...

    I'd like , please best drugs for neck pain Putin has said Snowden must stop anti-U.S. activities. Snowden has said he does not regard his activities as hostile to the United States but Kucherena said last week that he had agreed to halt such actions. : Hyman
    I'd like , please <a href=" http://www.rightside.com.au/out-of-pocket-cost-for-drugs.pdf ">best drugs for neck pain</a>  Putin has said Snowden must stop anti-U.S. activities. Snowden has said he does not regard his activities as hostile to the United States but Kucherena said last week that he had agreed to halt such actions.
     
    
    
    • Public Snippets
    • Channels Snippets