How to Check Current User Exists in AD Group using Rest Api

We have a SharePoint 2013 On premise environments and having the Domain Groups with the Names contains SPECIAL characters as (Role)x$ Customer$ 2838.

Using the below rest call i am able to get all the Groups.

"/_api/web/siteusers?$  select=id,Title&$  filter=PrincipalType eq 4"; 

Now i want to Check the Current login user exists in a specific Domain Group using Rest api.

Display current post position in Elementor Posts widget

I’m using Elementor 2.6.8 + Elementor Pro 2.6.2

I’m designing an Archive template to display a list of Custom Post Types filtered by custom taxonomy terms. I’m using Posts Widget from Elementor Pro to do this without a line of code.

Also, thanks to Ele Custom Skin plugin (1.2.0), I can design each post skin in a custom way (hopefully Elementor Pro will provide this in the future)/

Now, I want to display, in each post, the post’s current position in the list (=in the WP loop).

I tried with this code snippet that I added to each post with the ShortCode Widget.

add_shortcode( 'current_post_count', function () {     global $  wp_query;     $  out = $  wp_query->current_post;     return $  out; } ); 

But this always return -1.

I suppose the reason is that, in the context of the Posts Widget, the global $ wp_query is not the one to get the info from. I suppose the widget use another variable. But thenm I don’t know how to achieve this. Maybe if I could get the actual $ query variable in use ? Or maybe use the Query ID parameter offered by the Posts Widget?

I don’t know how to get this to work.

Anything to point me towards the right direction guys? thanks!

Migrate Current React JS Project to Run in Sharepoint

Our team has created a React SPA that is js based as opposed to ts. From what I’ve seen, creating and utilizing a webpart requires typescript. This project is fairly large so I guess I’m just wondering what our best option would be to get this SPA into Sharepoint. Is converting the project to typescript the best option? Are there other options to deploy a SPA into Sharepoint without creating a webpart?

The other thing with this is we would like to have a test site where this runs on its own, outside of Sharepoint. Would we essentially need 2 different code bases to do that?

ssign permission of the current user to a list item programmatically

I am making an event web part which is connected to a list of items. When a user attends an event, a json object will be parsed to a txt document that is attached to that particular list item /event. with the user details. However, when an user does not have edit permission, this will not work. In this case I want to give the user edit permissions. Im using sharepoint online.

I was thinking to use REST API to change the users permissions for that particular list item, but from what I could gather it, seems it only works for groups permission etc and not for the current user. Have I missed something, or do I need to user another kind of method?

How do I discover my current system encoding?

In QtCreator, they have something that looks like this:

enter image description here

I changed the defualt encodring setting in an attempt to get my ide to display emojis, and now my system is really acting up. Including web pages here:

enter image description here

Not to mention my software will not compile. I am trying to reset my default encoding back to what my system uses… but it seems my system encoding has changed.

How do I find out my system encoding, and what should I change it to?

Removing Current Twitter Sessions

I haven't been for a while on Twitter and when i logged in the lasted days, i've noticed, that there has been a redesign for the desktop version and i can not find the option, to delete all my current sessions for my account which are related to these gadgets.

How can i remove all my current sessions, so only the newest gadget shows up, when i sign in again?

Bash – Copy all .jar files to current directory from subfolders

I have folder named datahub and it has 15 folders and more than 20 subfolder which holds .jar files. I wanted to find all .jar files from subfolders and copy back to my current directory.

I am referring Bash – create zip by finding files but this is copying subfolders as well, but i wanted to copy only .jar’s to my current directory or to create one directory and copy to it.

Thanks in Advance for your help Venkat

WP Query for all events prior to current date

I’m trying to display past and future events using a wordpress query. I’m able to query future events and even events that are on the same date as the current date.

But, when i use less than or equals to in the query, nothing returns at all.

Here’s the frontend for reference. https://www.epmsonline.com/speaker/pam-roberts/

<?php          $  terms = get_the_terms( $  post->ID , 'event_speaker', 'string'); //Pluck out the IDs to get an array of IDS $  term_ids = wp_list_pluck($  terms,'term_id');             $  current = current_time( 'Y-m-d' );                  $  the_query = new WP_Query( array(                     'post_type' => 'tribe_events',                     'meta_key' => '_EventStartDate',                     'tax_query' => array(                         array (                              'taxonomy' => 'event_speaker',                         'field' => 'id',                         'terms' => $  term_ids,                         'operator'=> 'IN' //Or 'AND' or 'NOT IN'                         )                     ),                     'meta_query' => array(                             array(                             'key'     => '_EventStartDate',                             'value'   => $  current,                             'compare' => '<=',                              'type' => 'DATE'                                  ),                         )                 ) );              while ( $  the_query->have_posts() ) :                 $  the_query->the_post(); ?>                    <div class="upcoming-events">                     <h2><?php the_title(); ?><br><?php echo tribe_get_start_date(); ?> - <?php echo tribe_get_end_time(); ?></h2>                    </div><!-- upcoming events-->              <?php endwhile;              /* Restore original Post Data               * NB: Because we are using new WP_Query we aren't stomping on the               * original $  wp_query and it does not need to be reset.             */             wp_reset_postdata(); ?>