Code Test 3

This is a C# sample:

uint Server_ProcessRefresh(string p0, sbyte p1, sbyte p2, sbyte p3, int p4, out Struct_0 p5)
uint Server_RegisterForNotification(string p0, int p1, int p2, out int p3)
uint Server_CheckRegisterForNotification(string p0, int p1)
uint Server_LockPolicySection(string p0, int p1, int p2, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p3)
uint Server_UnLockPolicySection(ref NtApiDotNet.Ndr.Marshal.NdrContextHandle p0) uint Server_GetGroupPolicyObjectList(string p0, string p1, string p2, int p3, out Struct_2[] p4, out int p5)
uint Server_GetAppliedGroupPolicyObjectList(int p0, string p1, string p2, string p3, out Struct_2[] p4, out int p5)
uint Server_GenerateGroupPolicyNotification(int p0, string p1, int p2)

 

 

This is a PHP sample:

<?php
function understrap_slbd_count_widgets( $sidebar_id ) {
    // If loading from front page, consult $_wp_sidebars_widgets rather than options
    // to see if wp_convert_widget_settings() has made manipulations in memory.
    global $_wp_sidebars_widgets;
    if ( empty( $_wp_sidebars_widgets ) ) :
        $_wp_sidebars_widgets = get_option( 'sidebars_widgets', array() );
    endif;
    $sidebars_widgets_count = $_wp_sidebars_widgets;
    if ( isset( $sidebars_widgets_count[ $sidebar_id ] ) ) :
        $widget_count = count( $sidebars_widgets_count[ $sidebar_id ] );
        $widget_classes = 'widget-count-' . count( $sidebars_widgets_count[ $sidebar_id ] );
        if ( $widget_count % 4 == 0 || $widget_count > 6 ) :
            // Four widgets per row if there are exactly four or more than six
            $widget_classes .= ' col-md-3';
        elseif ( 6 == $widget_count || $widget_count = 5) : // added the or statement for 5 widgets
            // If two widgets are published
            $widget_classes .= ' col-md-2';
        elseif ( $widget_count >= 3 ) :
            // Three widgets per row if there's three or more widgets
            $widget_classes .= ' col-md-4';
        elseif ( 2 == $widget_count ) :
            // If two widgets are published
            $widget_classes .= ' col-md-6';
        elseif ( 1 == $widget_count ) :
            // If just on widget is active
            $widget_classes .= ' col-md-12';
        endif;
        return $widget_classes;
    endif;
}
   

 

 

This is a JS example:

function updateContainer() {
    //Dynamically set the height of each CTA description to match the tallest.
    // Get an array of all element heights
    jQuery(".cyb-cta-match").css("height","");
    jQuery(".cyb-features-match").css("height","");
    if(jQuery(window).width() > 991 ) {
        
        var ctaElementHeights = jQuery('.cyb-cta-match').map(function() {
        return jQuery(this).height();
        }).get();
        var featElementHeights = jQuery('.cyb-features-match').map(function() {
        return jQuery(this).height();
        }).get();
        
        // Math.max takes a variable number of arguments
        // `apply` is equivalent to passing each height as an argument
        var ctaMaxHeight = Math.max.apply(null, ctaElementHeights);
        var featMaxHeight = Math.max.apply(null, featElementHeights);
        // Set each height to the max height
        jQuery('.cyb-cta-match').height(ctaMaxHeight);
        jQuery('.cyb-features-match').height(featMaxHeight);
    }
}

Recent Articles By Author

*** This is a Security Bloggers Network syndicated blog from CyberArk authored by Sean Galliher. Read the original post at: https://www.cyberark.com/threat-research-blog/code-test-3/