On Click Of button Highlight nth child hide Content Using jquery

PHP

<div id="lightbox" class="row filteredVideoContent">
    <?php
         foreach ( $aVideo as $oVideo ){?>
    <div class="col-sm-6 col-md-3 col-lg-3 photography app" id="load_data">
        <div class="portfolio-item">
            <!-- <div class="hover-bg"> -->
            <div class="">
                <a href="#video_container" data-backdrop="static" class="video_thumb" data-toggle="modal" data-videopath="<?php echo $oVideo['videoPath']; ?>" data-videosubject="<?php echo $oVideo['videoSubject']; ?>">
                    <div class="hover-text" data-toggle="tooltip" data-placement="right" title="<?php echo $oVideo[ 'videoSubject' ];?>">
                        <h4> <?php echo substr($oVideo[ 'videoSubject' ],0,20); ?> </h4>
                    </div>
                    <?php
                  if( ! empty( $oVideo[ 'videoThumb' ] ) )
                  {
                   $thumbName = $oVideo[ 'videoThumb' ];
                  }
                  else
                  {
                   $thumbName = "assets/video/common.jpg";
                  }
                 ?>
                    <img style="height:188px;width : 263px"
                         src="<?php echo base_url () . $thumbName ?>" class="videoThumb img-responsive"
                         alt="<?php echo $oVideo[ 'videoSubject' ];?>">
                        </a>
                    </div>

                <div>Uploaded By : <span data-toggle="tooltip" data-placement="right" title="<?php echo $oVideo[ 'userName' ];?>"> <?php echo substr($oVideo[ 'userName' ],0,20);?> </span></div>
                <div>HQ : <span data-toggle="tooltip" data-placement="right" title="<?php echo @$oVideo[ 'hq' ];?>">  <?php echo substr(@$oVideo[ 'hq' ],0,20);?> </span></div>
                <div>Subject : <span data-toggle="tooltip" data-placement="right" title="<?php echo $oVideo[ 'videoSubject' ];?>">  <?php echo substr($oVideo[ 'videoSubject' ],0,20);?> </span></div>
            </div>
        </div>
        <?php
            }
           ?>
    </div>
    <?php if(count($aVideo) > 8){ ?>
    <p class="dash">―――――――――――――――――――――――――――――――
        &nbsp;<button id="showAll" class="btn tf-btn btn-default" style="float:none;">Load More</button>&nbsp;
        ―――――――――――――――――――――――――――――――</p>
    <?php } ?> 
</div>

read more

regex to add more criteria to check invalid phone numbers

Here is an expression that accepts indian phone numbers. What changes are required to put one more criteria to NOT accept following numbers without changing the functionality of existing expression

9999999999
8888888888
7777777777
9898989898
9797979797
8787878787
8989898989
7878787878
7979797979

Thanks

$input = trim($input); //get rid of spaces at either end
if (preg_match('/^(?:(?:\+|0{0,2})91(\s*[\-]\s*)?|[0]?)?([789]\d{9})$/', $input, $m) == 1){
    return '+91'.$m[2];

regex to add more criteria to check invalid phone numbers

read more

regex to add more criteria to check invalid phone numbers

Here is an expression that accepts indian phone numbers. What changes are required to put one more criteria to NOT accept following numbers without changing the functionality of existing expression

9999999999
8888888888
7777777777
9898989898
9797979797
8787878787
8989898989
7878787878
7979797979

Thanks

$input = trim($input); //get rid of spaces at either end
if (preg_match('/^(?:(?:\+|0{0,2})91(\s*[\-]\s*)?|[0]?)?([789]\d{9})$/', $input, $m) == 1){
    return '+91'.$m[2];

regex to add more criteria to check invalid phone numbers

read more

EJB, Jersey and java.lang.NullPointerException in JavaEE 7

I am calling Ejbs multiple times in shape of layers (which is quite common) but I am getting these errors of null pointer.

I am using

  1. Wildfly 9.0
  2. JavaEE 7 JPA (with hibernate but no hibernate specific features)
  3. Jersey 2.21
  4. Hibernate 5.0.1.Final

Controller:

  @Named
      @Path("v1/populateList/")
      public class PopulateDataController {
      @EJB
      ListItemService listItemService;

      @GET
      @Path("auto")
      @Produces(MediaType.TEXT_PLAIN)
      public String populateList(){
          listItemService.populateList();
          return "done";
      }
  }

Service:

  @Stateless
  public class ListItemService {
      @EJB
      ListItemDao listItemDao;


      public void populateList(){
          System.out.println("booooooo");
          listItemDao.persist();
      }
  }

read more

EJB, Jersey and java.lang.NullPointerException in JavaEE 7

I am calling Ejbs multiple times in shape of layers (which is quite common) but I am getting these errors of null pointer.

I am using

  1. Wildfly 9.0
  2. JavaEE 7 JPA (with hibernate but no hibernate specific features)
  3. Jersey 2.21
  4. Hibernate 5.0.1.Final

Controller:

  @Named
      @Path("v1/populateList/")
      public class PopulateDataController {
      @EJB
      ListItemService listItemService;

      @GET
      @Path("auto")
      @Produces(MediaType.TEXT_PLAIN)
      public String populateList(){
          listItemService.populateList();
          return "done";
      }
  }

Service:

  @Stateless
  public class ListItemService {
      @EJB
      ListItemDao listItemDao;


      public void populateList(){
          System.out.println("booooooo");
          listItemDao.persist();
      }
  }

read more