mercredi 1 mars 2017

How to force @keyframes play till of it's end after on.(mouseout)?

I have an keyframe animation which plays when i hover on element. But after mouseout event, it stops too abruptly. How could i force it play till it's end? I tried on.(animationend) event - it doesn't work. Transform origin and huge delay - either don't work. Thanks.

http://ift.tt/2lcuBhm

class Main {
  constructor() {
    
  }


  waveOn() {
    $(this).addClass('wave-active');
  }

  waveOut() {
    var elem = $('.info__block');

    elem.removeClass('wave-active');
  }

  jsInit() {
    $('.info__block').hover(this.waveOn);
    $('.info__block').on('animationend', this.waveOut)
  }

}

new Main().jsInit();

  
.info__block {
        width: 100px;
        height: 100px;
        background: aqua;
        border-radius: 50px;
        position: relative;
        display: flex;
        justify-content: center;
}

.info__block:before {
       content: '';
       position: absolute;
       width: 100%;
       height: 100%;
       border-radius: 50px;
       border-top: 2px solid aqua;
}

.info__block:hover:before {
       animation: link-line 2.5s infinite .5s linear;
}

@keyframes link-line {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  60% {
    opacity: 0;
  }
  100% {
    transform: translateY(-50%) scale(1.6);
    opacity: 0;
  }
}
<div class="info__block info__block-1">
</div>



Redirect all users hitting top level site

I have a site hierarchy in SP looking like this:

http://acme.com

    http://acme.com/hr

    http://acme.com/it

Under each page there are lists and libraries, etc. like this:

http://ift.tt/2lcyMcZ

http://ift.tt/2mKV95F

    http://ift.tt/2lcuAtO

    http://ift.tt/2mKVSDH

    http://ift.tt/2lcAFpS

    http://ift.tt/2mKRyVh

What I need is a javascript type redirect (not that great with JS) that will take anyone hitting http://acme.com should redirect the users to http://newAcme.com including every list and asset belonging to the acme page should forward list this:

http://acme.com -> http://newAcme.com
http://ift.tt/2lcyMcZ -> http://ift.tt/2lcJb8v
http://ift.tt/2mKV95F -> http://ift.tt/2mKQSPH

http://acme.com/hr -> no redirect
http://ift.tt/2lcuAtO -> no redirect
http://ift.tt/2mKVSDH -> no redirect
http://acme.com/it -> no redirect
http://ift.tt/2lcAFpS -> no redirect
http://ift.tt/2mKRyVh -> no redirect

To reiterate... anything belonging to the top level site should be redirected to the new top level site, any subsites under the old site should not redirect the user anywhere.

All I have so far is a script in the master page is:

<script type="text/javascript>
    window.location = "http://newAcme.com";
</script>

But all this does is redirect everyone on every page including the subsites (which I do not want a redirect on) on the old domain because the master page contains this code. My thoughts are just including the script on the actual top level page and not include it in the master page. Does anyone have any suggestions for this? I think I've clearly laid out what I am after. I appreciate any support.




Laravel:Undefined property: Illuminate\Database\Eloquent\Collection::$id

i want the current user when add user in a team will save in database user id for this user not id for current user but when i use $user=User::all(); or $user=User::find($id); don't work and have error Undefined property: Illuminate\Database\Eloquent\Collection::$id and when use $user=Auth::user(); save the current user id

public function addUser($id) {

        $teams =TeamWork::find($id);

        $user =User::all();

        $teammember = new TeamMember;
        $teammember->user()->associate($user->id);
        $teammember->Teamwork()->associate($teams->id);
        $teammember->save();

        $users = User::pluck('username');

    return View('teams.adduser' , compact('users'))->with('teams', $teams);


  }




Effort Estimations for an AngularJS Web Client

I am a backend developer with limited web front-end experience and I need to create some cost estimates for a reasonably simple web browser client, for a desktop and mobile device.

Effort for designing the server-ware and the middle-ware I can estimate, however the web front-end is not in my field of expertise.

I have the following non functional client requirements :

  1. has to be functional without a web server
  2. session managed via LDAP
  3. development with Angular 2
  4. backend will be sprint based (SpringSecurity, Swagger, Spring Interface DAOs, Spring Rest Template)

I need to meet the following functional requirements:

  • As a user I need to be able to login and logout. The client application needs to have a concept of rights, as the edit operations detailed later are not allowed for all users.
  • As a user I need to be able to select a sector for the client application (a dialog with drag and drop for example), so that I can provide bespoke content for a table.
  • As a user I need to be able to show a table with circa 10 columns, some with images. The table is readonly and receives sporadic server updates. When I click on a row from the table, the table will expand to show three sliders. The three sliders are the only edit operations in the client.
  • As a user I can filter the table with a free text field, so that I can find table entries easier.
  • As a user I will need to search for entries from the backend archives. To do so a dialog will allow me to enter search parameters.

Assumptions

  • Experienced development team of 3 developers and and a scrum master
  • Pragmatic UI without any major bells and whistles
  • Search happens on server
  • Filtering of the table content happens in the front end

Given these very general requirements and assumptions, I have the following questions.

What other technologies might I need in the front end other than angular?

What sort of ball park figure for effort would be required to design and implement just the front end (including unit tests)? Are we talking 200 days of design, development and test, or 50?




How can i get the mac address of device either of mobile or system from browser application

For security reason i want to get the mac address of clients who are using our website, either you can provide a solution to get on client end or server end, but just we need mac address of clients who are accessing our website, please provide any solution for it, thanks




What's a good way to generate and print a whole div only once in PHP?

I have a complex menu where i have to generate three new menus for every menu item in the first column of the menu (something like amazon has), and the part where I generate the menu is rather simple, but because I'm dealing with a lot of data when I generate the menu, it's very slow to do it, and that menu appears on every page so it has a huge impact on the page load.

What I want to do is generate that div only once and then only print it, rather than generate it upon every refresh of the page. What is the best way to approach this?




response.sendError(403), but return is 404

the code like this:

void doFilter(request, response, chain){
  try{
    //something code process
    chain.doFilter(request,response);
  }
  catch(Exception e){
    response.sendError(403,"Forbidden");
  }

}

directly visit the web project, not pass nginx and something like that. but the status return is always 404, is here someone who can help me? thanks a lot.