Skip to main content

Posts

CSS varibale in own style [duplicate]

I'am not profficient in html and css, so i dont even know how to search for a post here in StackOverflow I excuse my selfe beforehand if this is an duplicate. i want to do something like this: margin-horizontal { margin-left: var; margin-right: var; } <div style="margin-horizontal: 50px"> Is there a way to accomplish this behavior? Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW

Canvas doesn't working in safari Iphone ReactJS

I tried everything, someone knows how to make canvas works in safari iphone, or an alternative approach that works similar? I have this component that tracks faces from react, but it's not working only on iphone, i modified it inoumerous times, but nothing works, someone can help me? FaceDetector.js import _regeneratorRuntime from "@babel/runtime/regenerator"; import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; import _createClass from "@babel/runtime/helpers/esm/createClass"; import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import React, { Component } from &

Laravel: How to use a parameter other than user id in a URL

I'm creating a Laravel web site where users can login and upload images. For visitors to see that user's gallery, I've set up a gallery page with a URL like https://localhost8000/gallery/2, where 2 is the user ID. My current code looks like this. web.php Route::get('/menu/{user}', 'CartController@menu'); CartController.php public function menu($user) { $user = User::findOrFail($user); return view('new_menu')->with(['user' => $user]); } Instead of using the user ID as a route parameter, I want to use a random string. Currently a random string of 32 digits is created when the user registers and stored in the users table in a column called random . I couldn't figure out how to relate "random" to "user" in web.php and Controller. source https://stackoverflow.com/questions/70128106/laravel-how-to-use-a-parameter-other-than-user-id-in-a-url

PHP Symfony FormType EntityCollection into Choices

I am beginner in PHP and Symfony and I started recently on a project. We have 2 entities which are related by doctrine Annotation ManyToMany with JoinTable Example: entity and datatable Room , entity and datatable Person and datatable RoomPerson (entity does not exist and just exist in doctrine annotation JoinTable). The entity Room has a property Collection of Persons. With a formType it is rendered in page as a select html element multiple (so we can choose several persons) FormType with preEvent to fill list of possible persons: $allowedPersons = $this->em->getRepository(Person::class)->findBy(***); $form ->add('personList', EntityType::class, [ 'class' => Person::class, 'choices' => $allowedPersons , public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => Room::class, New request is to order the list of Persons. So I made

I try to create a custom querybuilder with symfony

Hi everyone and thanks for reading me, I have a OneToMany relationship on these 2 entities: Article ArticleLikes <?php namespace App\Entity; use App\Repository\ArticleRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=ArticleRepository::class) */ class Article { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $title; /** * @ORM\Column(type="text") */ private $content; /** * @ORM\Column(type="datetime_immutable") */ private $createdAt; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="articles") * @ORM\JoinColumn(nullable=false) */ private $relation; /** * @ORM\OneToMany(targetEntity=Ar

How do I link whatsapp link in a form field?

I have a form in which I want to add a field for people to fill it with their whatsapp number. The idea is that when the data of this form arrives to the recipient (an email account) that whatsapp number arrives already with the link so that when pressing it the whatsapp opens to communicate with the person who left his number in the form. I know that the link https://wa.me/ is used to link a cell phone number to whatsapp. I leave you the content of my php file and the question and help I need is to know how to link the number that goes in the whatsapp field in that file. <? //Configuracion: $file_done = "gracias.htm"; $email_to = "hola@gmail.com"; $email_subject = "Consulta"; $email_body = " <FONT face=\"Verdana\" size=\"2\"> <b>Nombre:</b> $_POST[nombre] <br> <b>WhatsApp:</b> $_POST[whatsapp] <br> <b>Email:</b> $_POST[email] <