Create employee rows for each date in date range

I have a list of employees. I need to create output which is one row per date in a date range for each employee. The date range will always be the last 15 days, so it is expected to have 15 rows for each employee. A “few thousand” employees. This is SQL Server.

SAMPLE SOURCE EMP TABLE:
EMP1
EMP2

RESULT:
EMP1, JAN 1
EMP1, JAN 2
EMP1, JAN 3
EMP2, JAN 1
EMP2, JAN 2
EMP2, JAN 3

Users list with Ajax Pagination inside each author profile for their follower and following users

I’m trying to create an followers/following users list for each user in their profile page with Ajax Pagination.

Someone here was helped me to make the Ajax pagination working, but i’m facing a big problem and i can’t fix it!

The problem i’m facing is inside all our users profile page when they click on load more button they are getting the users who followed the administrator id!!

Inside author.php i get the author information by using this line.

<?php     $  curauth = (isset($  _GET['author_name'])) ? get_user_by('slug', $  author_name) : get_userdata(intval($  author)); ?> 

So how to make them getting their followed users?

Here is all my code i have done.

author.php

<div id="following">      <div class="following-cont"> <?php  $  include = get_user_meta($  curauth->ID, '_pwuf_following', true);  if ( empty( $  include ) ) {       echo '<div class="no-follower">Not found followers yet <i class="fa fa-slack fa-1x" aria-hidden="true"></i></div>';      } else {  $  args = array (     'order' => 'DESC',     'include'  => $  include,     'number'  => 6,     'paged' => 1 );  $  wp_user_query = new WP_User_Query( $  args );  $  users = $  wp_user_query->get_results();      echo '<div id="top-artists-contributors-3">';     echo '<ul id="grid-contributors-4">';     echo '<li class="scroll-artists">';     foreach ( $  users as $  user ) {         $  avatar_size = 90;         $  avatar = get_avatar($  user->user_email, 200);         $  author_profile_url = get_author_posts_url($  user->ID);         $  profile = get_userdata($  user->ID);      echo '<div class="single-item-3">';     echo '<div class="author-gravatar-3"><a href="', $  author_profile_url, '">', $  avatar , '</a></div>';     echo '<div class="members-name"><a href="', $  author_profile_url, '">' . $  profile->first_name .'</a></div>';     echo '</div>';                }     echo '</li>';     echo '</ul>';     echo '</div>';     }  ?>  <?php // The variables tmp_author_name and tmp_author serve only as temporary storage. // They controls how the data should be determined on the server. $  tmp_author_name = ''; $  tmp_author = 0; if( isset($  _GET['author_name']) ) {     $  tmp_author_name = $  author_name; } else {     $  tmp_author = intval($  author);   } ?>  <script type="text/javascript"> var ajaxurl = "<?php echo admin_url( 'admin-ajax.php' ); ?>"; var page = 2; jQuery(function($  ) {     $  ('body').on('click', '.loadmoreartists', function() {             var data =              {                 'action': 'user_following_by_ajax',                 'page': page,                 'security': '<?php echo wp_create_nonce("user_more_following"); ?>',                 'author_name': '<?php echo esc_html($  tmp_author_name); ?>',                 'author': '<?php echo esc_html($  tmp_author); ?>'              };          $  .post(ajaxurl, data, function(response) {          $  ('.following-cont').append(response);         page++;          });     }); }); </script>  </div>  <div class="loadmoreartists">More</div>  </div><!-- #following --> 

function.php

add_action('wp_ajax_user_following_by_ajax', 'user_following_by_ajax_callback'); add_action('wp_ajax_nopriv_user_following_by_ajax', 'user_following_by_ajax_callback');  function user_following_by_ajax_callback() {      check_ajax_referer('user_more_following', 'security');     $  paged = $  _POST['page'];      $  curauth = NULL;      if( isset($  _POST['author_name']) AND trim($  _POST['author_name']) != '' )     {         $  curauth = get_user_by('slug', trim($  _POST['author_name']) );     }     elseif( isset($  _POST['author']) AND intval($  _POST['author']) > 0 )     {         $  curauth = get_userdata(intval($  _POST['author']));        }      if( !is_null($  curauth) ) {  $  include = get_user_meta($  curauth->ID, '_pwuf_following', true);  if ( empty( $  include ) ) {       echo '<div class="no-follower">Not found followers yet <i class="fa fa-slack fa-1x" aria-hidden="true"></i></div>';      } else {  $  args = array (     'order' => 'DESC',     'include'  => $  include,     'number'  => 6,     'paged' => $  paged );  $  wp_user_query = new WP_User_Query( $  args );  $  users = $  wp_user_query->get_results();      echo '<div id="top-artists-contributors-3">';     echo '<ul id="grid-contributors-4">';     echo '<li class="scroll-artists">';     foreach ( $  users as $  user ) {         $  avatar_size = 90;         $  avatar = get_avatar($  user->user_email, 200);         $  author_profile_url = get_author_posts_url($  user->ID);         $  profile = get_userdata($  user->ID);      echo '<div class="single-item-3">';     echo '<div class="author-gravatar-3"><a href="', $  author_profile_url, '">', $  avatar , '</a></div>';     echo '<div class="members-name"><a href="', $  author_profile_url, '">' . $  profile->first_name .'</a></div>';     echo '</div>';                }     echo '</li>';     echo '</ul>';     echo '</div>';     }     wp_die();     } } 

Open 4 web browser windows in full-screen mode each in 1/4 of the screen

I regularly have some webcams open on one of the monitors of my computer. I would like to be able to open them in full screen mode, but have each “full screen” be only 1/4 of the whole screen.

Here’s how I view them at present:

enter image description here

I would like to have each webcam run in full-screen mode so that I get larger pictures and avoid wasting screen space with all the window frames, toolbars, etc.

Is there any way I can do this? My web browser of choice is Google Chrome and I’m using Ubuntu 18.10

NB I have a second monitor connected to my computer too, so any solution needs to take that into consideration too.

App to track hours in each work site

I’m a contractor and I visit my customer places, I would like to install an app that does automatically detect how much time I spend for a customer at which location with an ability to mark the project or client name.

In short I want a location based work log. Most of the apps currently require to clock-in or clock-out manually.

Value iteration in MDP – updating each state once per inner loop?

In value iteration algorithm we update the utility of all possible states (“for each state update its new utility”).

After we’ve updated all states we check to see if the delta is smaller than some value. If not we loop again over all sates.

If we have 2 adjacent sates say A, B – after updating A we can move on to updating since they are adjacent. Is it possible to go back to update A again since its value will be different again (since B just changed) ? or is the order should be to go over all states exactly once per the inner loop and go back to a state already visited only when we implement the inner loop again ?

`Unregistered Authentication Agent for unix-process` when I restart Apache each time?

My server is centos 7.4 with Apache 2.4.6.
Each time when I systemctl restart httpd,2 messages will added to /var/log/secure.Looks like :

Jan 19 8:23:48 localhost polkitd[493]: Registered Authentication Agent for unix-process:5739:174943 (system bus name :1.119 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) Jan 19 8:23:49 localhost polkitd[493]: Unregistered Authentication Agent for unix-process:5739:174943 (system bus name :1.119, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus) 

What’s the problem?