Build Isotope filter groups with category terms

Sorry for the large question. I’m a bit lost and I want to provide all data possible for problem understanding. There are two options for achieve the goal. First, build the markup with a walker, second, build the markup iterating an array. The main question is how to build it with a walker. Althought I provide my attempt to build it with an array in order to ask weather it is a good practice.

I have this category terms structure:

term-1-level-1     term-2-level-2     term-3-level-2     term-3-level-2     term-4-level-2 term-5-level-1     term-6-level-2     term-7-level-2     term-8-level-2 

Trying to build this markup from category terms:

<div class="button-group filter-button-group">   <button data-filter=".term-1-level-1">     term-1-level-1</button>   <button data-filter=".term-2-level-2">     term-2-level-2</button>   <button data-filter=".term-3-level-2">     term-3-level-2   </button>   <button data-filter=".term-4-level-2">     term-4-level-2   </button> </div>   <div class="button-group filter-button-group">   <button data-filter=".term-5-level-1">     term-5-level-1</button>   <button data-filter=".term-6-level-2">     term-6-level-2</button>   <button data-filter=".term-7-level-2">     term-7-level-2   </button>   <button data-filter=".term-8-level-2">     term-8-level-2   </button> </div> 

The question is: Is it possible to build it with the walker class? I tried extending Walker and Walker_Category, unsuccesfully, this way:

class Isotope_Walker extends \Walker {      public $  tree_type = 'category';      public $  db_fields = array ('parent' => 'parent', 'id' => 'term_id');      function start_lvl(&$  output, $  depth=0, $  args=[]) {         $  output .= "\n<div class=\"button-group filter-button-group\">\n";     }      function end_lvl(&$  output, $  depth=0, $  args=[]) {         $  output .= "</div>\n";     }      function start_el(&$  output, $  category, $  depth = 0, $  args = [], $  id = 0) {         $  output .= '<button>' . $  category->name;     }      function end_el( &$  output, $  page, $  depth = 0, $  args = []) {         $  output .= '</button>';     }  } 

In other hand I know that I can build an array with terms for iterate the array, this way:

public function filters()     {         $  terms = get_terms( array(             'taxonomy' => 'category',             'hide_empty' => false,         ) );          foreach ($  terms as $  term) {             if ($  term->parent === 0 && $  term->slug != 'no-category') {                 $  parents[] = [                     'id' => $  term->term_id,                     'name' => $  term->name,                     'slug' => $  term->slug,                 ];             }         }          foreach ($  parents as $  parent) {             $  parent_id = $  parent['id'];             $  {'parent_childs_' . $  parent_id}['parent_' . $  parent_id] = $  parent;             foreach ($  terms as $  term) {                 if ($  term->parent === $  parent_id ) {                     $  {'childs_of_' . $  parent_id}[] = [                         'id' => $  term->term_id,                         'name' => $  term->name,                         'slug' => $  term->slug,                     ];                 }                  if (isset($  {'childs_of_' . $  parent_id})) {                     $  {'parent_childs_' . $  parent_id}['childs_' . $  parent_id] = $  {'childs_of_' . $  parent_id};                 }             }              $  output['parent_childs_' . $  parent_id] = $  {'parent_childs_' . $  parent_id};          }          return $  output; } 

This returns:

array (size=3)   'parent_childs_3' =>      array (size=2)       'padre_3' =>          array (size=3)           'id' => int 3           'nombre' => string 'Artes visuales' (length=14)           'slug' => string 'artes-visuales' (length=14)       'childs_3' =>          array (size=6)           0 =>              array (size=3)               'id' => int 4               'name' => string 'Escultura' (length=9)               'slug' => string 'escultura' (length=9)           1 =>              array (size=3)               'id' => int 4               'name' => string 'Escultura' (length=9)               'slug' => string 'escultura' (length=9)           2 =>              array (size=3)               'id' => int 4               'name' => string 'Escultura' (length=9)               'slug' => string 'escultura' (length=9) 

So, I can iterate it and build the markup without walker. Regarding this method, I would like to ask if it is a good practice or is better the walker way.

Thank you!

Custom Navigation bypass SharePoint Group and use AD Groups

I have a custom SharePoint 2016 on prem Navigation with links only certain people can see. Currently I am using a SP Group and manually updating it when there is a new hire with their AD account. What I would like to do is bypass the SP Group and use AD groups so I don’t have to manually update anymore. Hope this makes sense. Below is my code to read from the SP Group.

var allowedGroups = [“IT”]; var isInAllowedGroup = false;

var userid= _spPageContextInfo.userId; var requestUri = _spPageContextInfo.webAbsoluteUrl + ‘/_api/web/CurrentUser/Groups?$ select=Id,Title’;

//alert(requestUri); var requestHeaders = { “accept” : “application/json;odata=verbose” }; $ .ajax({ url : requestUri, contentType : “application/json;odata=verbose”, headers : requestHeaders, success : onSuccess, error : onError });

function onSuccess(data, request){ var s=”; for (var i = 0; i < data.d.results.length; i++) { s +=data.d.results[i].Title+’\n’;

var groupName = data.d.results[i].Title; if (allowedGroups.indexOf(groupName) > -1) { isInAllowedGroup = true; } }

if(isInAllowedGroup){ $ (“#IT”).css(‘display’, ‘block’); }

 (s); 

} function onError(error) { (“error”); }

});

thanks you in advance.

Sharing Documents with Groups or Users using Powershell

We have a Document Library with Document Sets, each containing a bunch of Documents on employees.

An employee should only be able to view specific file(s) within their Document Set.

A number of groups should be able to view everything (The employee’s Document Set and all Documents within).

Permissions, inheritance, and assignments were messed up. The solution is to reset everything.

Using PowerShell, I am able to restore Inheritance (recursively) from the Document Library, which will grant the Groups that need to see everything the correct access.

Then I break the inheritance between the Documents, the Document Sets, and Document Library.

In order for an employee to view and edit the documents they need to edit, I must share the a) Document Set, b) the Document. However, when I share the Document Set with them, all documents within the Doc Set are shared with them (which is incorrect) even though I had broken the inheritance between the Documents and their parent Document Set.

Questions:

1- Is there a way I can share a Document Set level with a user without sharing the documents within this Doc Set?

2- Is it possible to use Powershell to share Documents with specified user groups?

Thanks for any feedback.

TK

Are AWS security groups enough to segment network and reduce PCI scope?

I was reading this paper

https://d1.awsstatic.com/whitepapers/pci-dss-scoping-on-aws.pdf

It shows this image

enter image description here

Am I correct in saying that – as long as instances have proper security groups that restrict connectivity, it will remove them from PCI scope?

On an additional note – is it just me that finds it awfully difficult to get best practice for PCI within cloud environments – seems a bit all over the place.

Should we go with git flow or trunk based development where development, test and deployment done by separate groups

The focus of our company is not software but we have our own team that develops apps and services to support our business. There are more than 300 from small one-liners to huge fully-fledged web applications to just PL/SQL packages. Our team is generally composed of senior engineers. But we don’t have any open source applications and hardly ever more than 2 developers work on the same project if ever more than just one. So it’s most of the time just one guy working on a project at the same time. The process is defined so that we first do the development, then after we finish our job we pass it to testers and if all the tests pass, they, in turn, pass it to the operations group for deployment. We usually have no strict deadlines because what our business mainly runs on is a bunch of third party software and not what we develop in-house. So I’m a bit confused as to whether we should adopt git flow or trunk based development, or even something else. Does anybody have a similar environment? If so, what way do you go?

RenderListDataAsStream – Override rowLimit option for groups

I’m using RenderListDataAsStream for getting document library data with grouped view. After group expand I want to load all items inside that group, not only specified amount (items limit) in View settings.

"https://contoso.sharepoint.com/sitename/_api/web/Lists/getbytitle('Title')/RenderListDataAsStream?IsGroupRender=TRUE&DrillDown=1&view=bb2f25d1-0766-4a85-ac5f-f17054c83876&GroupString=%3B%23Group1%3B%23Group2%3B%23"; 

So, this query will return only 30 ‘Group2’ items from library. How can I override items limit?

Serre’s special groups and polynomials in Lefschetz element

Consider Grothendieck’s ring of varieties, $ K_0(\mathcal{Var}_k)$ over a field $ k$ , and the Lefschetz element $ \mathbb{L}=[\mathbb{A}^1_k]$ . Consider also the subring $ \mathcal{L}_k\subset K_0(\mathcal{Var}_k)$ consisting of all classes which are polynomials in $ \mathbb{L}$ , which for convenience I’ll call the “Lefschetz ring”.

It is known that $ GL_n(k)$ is in $ \mathcal{L}_k$ , for example: $ $ [GL_2(k)]=(\mathbb{L}^2-1)(\mathbb{L}^2-\mathbb{L}).$ $ Also, $ \mathbb{G}_a\cong \mathbb{A}^1_k$ and $ \mathbb{G}_m\cong k^\times$ are clearly in $ \mathcal{L}_k$ . Since the examples above are all examples of special groups, as defined by Serre and classified by Grothendieck ($ G$ is called special if any principal $ G$ -bundle over a $ k$ -variety is locally trivial in the Zariski topology) (and not having found references with computation of the classes in $ K_0(\mathcal{Var}_k)$ of orthogonal groups (which are not special, for example)), I wonder if all special groups have their classes in the Lefschetz ring.

More generally, the question is: is there any known relation between special groups and groups whose classes are in $ \mathcal{L}_k$ (if necessary, one could assume $ k=\mathbb C$ )?

Poisson Summation Formula for Square-Integrable Functions on Locally Compact Abelian Groups

The Poisson Summation Formula (PSF) is most often stated with the requirement that the functions in question be in $ L^{1}$ . However, after doing some searching, I found that there is a paper by R.P. Boas, Jr. which extends the PSF to square-integrable functions in the case of $ L^{2}\left(\mathbb{R}\right)$ . As such, I was wondering where I might be able to find a generalization of this result to functions defined on $ L^{2}\left(G\right)$ , where $ G$ is an arbitrary locally compact abelian group.

If it helps, I’m only really interested in the case where $ G$ is $ \mathbb{Q}$ or $ \mathbb{Q}/\mathbb{Z}$ —or, equivalently, their duals, $ \mathbb{A}$ (the $ \mathbb{Q}$ adeles) and $ \overline{\mathbb{Z}}$ (the profinite integers).

Automorphisms and epimorphisms of finite groups

All groups in this question are finite, and epimorphism means surjective group homomorphism.

Suppose I have two epimorphisms $ f,g\colon G\to H$ . This implies that $ \ker(f)$ and $ \ker(g)$ have the same composition factors, but they need not be isomorphic. I’ll say that $ f$ and $ g$ are compatible if $ g=fh$ for some automorphism $ h$ of $ G$ . This would imply that $ \ker(g)\simeq\ker(f)$ , so it is not always true. I ask: does there always exist $ K$ and an epimorphism $ p\colon K\to G$ such that $ fp$ and $ gp$ are compatible?

If $ G$ is nilpotent we can reduce to the case where it is a $ p$ -group, then I think we can take $ K$ to be the initial example of an $ k$ -generator group of exponent $ p^n$ and nilpotence class $ c$ , for sufficiently large $ k$ , $ n$ and $ c$ . In particular, if $ G$ is an abelian $ p$ -group I think we can take $ K=C_{p^n}^k$ for sufficiently large $ k$ and $ n$ . But I am not sure what to do when $ G$ is not nilpotent.