How can I use CAD ground plane in PHP web application in order to calculate distances between points?

I have an Autocad Warehouse ground plane which I want to read on my PHP based web application in order to calculate exact distances between points (not airline distance) which are actually storage slots in warehouse.

Is there any platform/framework/script which can help me?

Any ideas, advices? Thanks in advance.


Source: stackoverflow-php

Reverse CSS @keyframes animation, WITHOUT JavaScript. At all. Possible?

What is annoying me is that when you define @keyframes, to do the opposite/reverse you have declare the thing twice!

Sure, transitions reverse themselves but then you have the problem with initial state.

See this example:

.class {
   animation-timing-function: ease-in-out;
   animation-direction: alternate;
   animation-fill-mode: both;
   animation-name: slideInLeft;
}

.class:hover, .class.hide {
  // F*****G reverse and retrigger the keyframe animation
}

@keyframes slideInLeft {
    from {
        transform: translate3d(-100%, 0%, 0%);

    }
    to {
        transform: translate3d(0%, 0%, 0%);
    }
}

Rather than also being forced to do:

@keyframes slideOutLeft {
    from {
        transform: translate3d(0%, 0%, 0%);
    }
    to {
        transform: translate3d(-100%, 0%, 0%);
    }
}

I would like to say that on:

.class:hover, .class.hide { 
       // REVERSE THE slideInLeft animation without using slideOutLeft: 

       animation-name: slideOutLeft;

       // Rather I would like to say

      animation-name:slideInLeft ; // the same as .class really

      // but 
      animation-direction:reverse; 
      animation-fill-mode:backwards; 

      // do not work because they don't retrigger the animation if it has the same name. Only if I change the name and declare a totally new keyframe can I do what I want. 
}

Meaning I’m not interested in repeating the declaration, which is just the opposite of slideInLeft.

For complex animations, this is extremely annoying to do.


Source: stackoverflow-javascript

List all the users with the count of drivers they registered

i have tow models Userand Driver the user can register any number of drivers drivers

in drivers table i have agent_id, i want to list all the users with the count of the drivers they registered

in my Usercontroller i want to get the count of the drivers registered by the agents

public function index(Request $request) 
{
    $users = User::all();

    $registration_centers = RegistrationCenter::all();

    $drivers_registered = Driver::where('agent_id' , $agent_id)->count();  //something like this but i don't have agent_id to query with

    return view('agents', compact('users', 'registration_centers', drivers_registered));
}

thank you


Source: stackoverflow-php

Programming a VistaPrint like Card Customization System

Vistaprint currently has a card system that essentially allows users to drag and drop text, images, backgrounds, etc… onto a GUI, which then prints the business card through their system. Almost like a WYSIWYG for very basic graphics design. Does anyone know a open-source or paid system that does something similar to this?

I have found this JS Print Designer (https://codecanyon.net/item/js-print-designer/7750853?_ga=1.260324553.575561816.1488834276) But obviously wanted to look at more options and have had some trouble finding them. Obviously building from scratch is a bit excessive, if others have already built it.

Thank You.


Source: stackoverflow-php

PHP & Unity – Moving Info back and forth

I posted not long ago and decided to make another thread.

In our application we ask the players to create a new account, when they do we add this information to our DB.

The next step is to now grab the account they created, so that we can add more data to it. So the player creates an account with us, after this is done we then login with Google Play Services, and we now need to add info from google to the account they created, locale, id, etc

My problem here being new to php is im not sure on the correct way to do this so im asking for some guidance on it and have a couple of questions that may or may not make any sense.

  1. When a user creates an account i now need to reference and keep a hold of this account they created so that we can easily access and edit/add info to it. How would you accomplish this?

  2. When i need information from the database to display in the application how would i grab this info specific to the player and read it directly into unity? I think i could use the JsonEncode but im not sure if this is the most efficient way to do this.

There is more but i don’t want to ask to much all at once haha.

Thanks for any and all help.

John


Source: stackoverflow-php