Javascript action php

I have form with js validation, and I need to action on php file through js, how I can this do better. Can you help and say who is better to do it. if you directly connect the action to the php file, then everything works, but how can I do it through js? FORM… Read More Javascript action php

Fetch runs double with old and updated value

I have a fetch function as a component: export const FetchBooksBySubject = (selectedValue) => { const options = { method: `GET`, }; return fetch(`${server}/books?subjects_like=${selectedValue}`, options) .then((response) => { if(response.ok){ return response.json() } throw new Error(‘Api is not available’) }) .catch(error => { console.error(‘Error fetching data: ‘, error) }) } This function I use in my… Read More Fetch runs double with old and updated value

Matching multiple unicode characters in Golang Regexp

As a simplified example, I want to get ^⬛+$ matched against ⬛⬛⬛ to yield a find match of ⬛⬛⬛. r := regexp.MustCompile("^⬛+$") matches := r.FindString("⬛️⬛️⬛️") fmt.Println(matches) But it doesn’t match successfully even though this would work with regular ASCII characters. I’m guessing there’s something I don’t know about Unicode matching, but I haven’t found any… Read More Matching multiple unicode characters in Golang Regexp

How should I resolve ASP.NET Core multiple endpoints error

My controller is: [Route("api/[controller]")] [ApiController] public class SubjectController : ControllerBase { private TourActivityExpenseContext tourActivityExpenseContext = new TourActivityExpenseContext(); [HttpGet] public IEnumerable<SubjectTo> Get() { var subjects = tourActivityExpenseContext.SubjectTos.ToList(); return subjects; } [HttpGet("{subject}")] public int GetSubjectId(String subject) { var subjects = tourActivityExpenseContext.SubjectTos.ToList(); var isSub = subjects.FirstOrDefault(x => x.Subject == subject); int id = isSub.Id; return id; } [HttpGet("{id}")]… Read More How should I resolve ASP.NET Core multiple endpoints error

foreach() argument must be of type array|object, bool given. How can i join another table where a where clause also must be there.?

$SQL = "SELECT * FROM note_list JOIN `notemaker_tables` ON note_list.notemaker_id=notemaker_tables.notemaker_id WHERE notemaker_id = ‘$notemaker_id’;"; $result = $con->query($SQL); ?> <?php <!– Featured Project Row–> <h1 class="text-white">Notes By <?php echo $notemaker_id; ?></h1><br> <?php foreach ($result as $r) { ?> <div class="row align-items-center no-gutters mb-4 mb-lg-5"> <div class="col-xl-8 col-lg-7"> <iframe id="pdf-js-viewer" src="dashboard/note-pdf/<?php echo $r[‘note’]; ?>" title="webviewer" frameborder="0" width="500"… Read More foreach() argument must be of type array|object, bool given. How can i join another table where a where clause also must be there.?

Why Is Asserting Resolved UIColor Failing After Changing UIUserInterfaceStyle in Unit Test?

I am working on a project that uses named color assets, and I am responsible for updating the unit tests that assert the correct color values. We have an XCTestCase subclass (BaseXCTestCase) that has a window property, which is set to a value of UIApplication.shared.firstKeyWindow: var window = UIApplication.shared.firstKeyWindow! firstKeyWindow is defined as windows.filter {… Read More Why Is Asserting Resolved UIColor Failing After Changing UIUserInterfaceStyle in Unit Test?