17,542 questions
1
vote
1
answer
50
views
The NEO-8M produces incomprehensible characters
I have that code:
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include "esp_system.h"
#include "esp_timer.h"
#include "freertos/projdefs.h&...
Best practices
0
votes
3
replies
88
views
How to user Riverpod NotifierProvider with Controllers?
I always struggle to hook up Controllers with Riverpod NotifierProvider. For example, TextEditingController, MapController or in this case I need to hook it up with TreeController from the ...
0
votes
0
answers
52
views
Codeigniter 3... Undefined Property $Ngetest
Models: Ngetest.phpp
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Ngetest extends CI_Model
{
public function showEcho()
{
return "naisu";
...
0
votes
1
answer
49
views
How to duplicate a Flutter controller without sharing the same reference?
I have a list of controllers in Flutter:
final List<StackBoardController> _boardControllers = [];
When I try to duplicate one controller like this:
_boardControllers.add(_boardControllers[3]);
...
1
vote
0
answers
143
views
Right way to do HttpClient that can be injected and used in Blazor server
Currently, I have this configuration for http client that I can use and inject when needed, wrapped with JWT authentication to hit some API address that has multiple end points:
builder.Services....
1
vote
1
answer
219
views
How to receive an array of objects (with IFormFile) using [FromForm] in ASP.NET Core Web API?
I'm building an ASP.NET Core Web API endpoint that needs to receive an array of complex objects via multipart/form-data. Each object includes key-value string pairs and an optional file upload. Each ...
0
votes
1
answer
50
views
How to convert HttpResponseMessage to ViewResult?
I have an ASP.NET MVC controller endpoint of type ActionResult that returns a ViewResult by calling Controller.View(<some html>).
When integration testing this endpoint is it possible to convert ...
0
votes
0
answers
34
views
Symfony 6.4 controller receives blank response from command
I have a Symfony 6.4 controller that accepts a JSON, retrieves the values from the JSON, sets the arguments and calls a Symfony Command with these arguments. The Command executes certain API calls and ...
1
vote
2
answers
66
views
Create controllers automatically from model
I work with ASP.NET Core and have written an API controller as follows:
public class AcademicController : GenericController<Academic>
{
public AcademicController(IRepository<Academic> ...
0
votes
3
answers
120
views
How to provide a form field for a grandparent in Ruby-on-Rails SimpleForm?
I have 3 models in Rails, Category (grandparent) has_many Domain (parents), which has_many Url (children). Here, users can create/edit Url but not the other two; Domain model is automatically created/...
0
votes
1
answer
99
views
How to use controllers from a library project in .NET 9 self-hosted Kestrel Windows Forms app?
I have made a .NET 9 self-hosted Kestrel Windows Forms app with controller(s) located in the same assembly:
It works well:
Here is the main Windows Form's start-up and shutdown code:
private ...
-1
votes
1
answer
95
views
PyGame inputs not working with Nintendo Switch Pro Controller
I'm trying to add controller inputs to a game I'm making but when pressing one of the buttons on the controller, the action is not being performed.
I was told to use JOYHATMOTION but the Pro ...
0
votes
1
answer
59
views
How to call a .net controller method with an http request?
I have the following controller method stub...
[HttpPut("myroute")]
public async Task<IActionResult> PutMethod([FromBody] MyContract contract)
{
//parse data from request, headers, ...
0
votes
0
answers
25
views
ASP.NET MVC Language coded url structure
My first goal is to get the id and code of the language when the user selects a language and keep it in the session. Because I will use the id for database queries and I want to be able to use the ...
0
votes
1
answer
53
views
How to make a transactional Services when developing a backend with Onion or similar architectures?
I'm developing a backend where controllers call services, and each service is responsible for handling an entity(table) in SQL. Now, what if I want to use a transaction, basically roll back previous ...