1,313 questions
1
vote
2
answers
143
views
Different handling of signed value between MSVC and GCC
Take the below piece of code, that simply Trims a string, removing whitespace characters from either end:
const std::string TrimString(const std::string& s)
{
const auto iter = std::find_if(s....
1
vote
1
answer
104
views
Why doesn’t "auto" change the width and height of my image?
I tried to add a picture to my HTML page, but the image was always way too large. I didn’t want to set the width and height in pixels, because then it doesn’t scale properly when the browser isn’t in ...
3
votes
3
answers
225
views
Receiving a lambda through auto&&
If I assign a lambda in C++ with this:
auto&& mylambda = [&](int someparam)
{
some_function();
return 42;
};
Is this wrong? I know that this triggers auto type deduction, but is ...
0
votes
1
answer
91
views
How to universally set dir=auto in about everywhere in any browser?
Please and before anything this is not only about YouTube. But YouTube is just an example. I am having an issue with YouTube comments that they are NOT displayed with HTML attribute dir=auto. So I am ...
0
votes
1
answer
114
views
No Android Auto application visibility on real car device after app uploaded on internal testing (Play Store)
I have an issue on Android Auto application visibility on real car device.This is Navigation app.
We have uploaded our Android Auto app to the Play Store for internal testing, and it has been approved ...
3
votes
3
answers
214
views
Overcoming use of auto before deduction of 'auto'
When I implement a class I start with public interface and then continue with private details, which I think creates a good order for those that read the code:
class Something
{
public:
// ...
0
votes
1
answer
78
views
C++ auto templated function overload ambiguity
#include <iostream>
#include <concepts>
struct Sound { int amplitude; };
struct Light { int brightness; };
template <typename T>
concept Alert = std::derived_from<T, Sound> &...
1
vote
0
answers
15
views
Auto add some product attributes when adding a new product in Woocommerce
How can I Auto add some product attributes when adding a new product in Woocommerce
I need to add some attributes to each category separately
Like
Processor category
Auto attributes
A
B
C
Motherboard ...
0
votes
1
answer
1k
views
Error 400: Missing 'functions[0].name' Parameter in Function Calling API for GPT-4o-mini, GPT-3.5, and GPT-4-0613 Models
I am developing a shopping assistant Chatbot. While using function calling APIs, I get an error. The "auto" does not seem to fetch any function. I use "gpt-4o-mini" model.
I ...
0
votes
1
answer
208
views
iOS — CoreBluetooth | Symbol not found — CBConnectPeripheralOptionEnableAutoReconnect
Running into a strange issue. CBConnectPeripheralOptionEnableAutoReconnect key from CoreBluetooth is set to be used only if iOS 17+ is available, otherwise it would fall back. But the app crashes even ...
2
votes
1
answer
146
views
C++ deduction guides for auto types
C++17 allows to create deduction guides for classes. Are they possible to be applied with autos as well?
Here is a quick example of what I'm trying to achieve:
#include <stdio.h>
struct Rect
{
...
3
votes
1
answer
137
views
Multiple occurrences of placeholder type 'auto' in a type
Let me use last current draft for clause about placeholder type deduction: https://eel.is/c++draft/dcl.type.auto.deduct
Part 3 reads (bold highlighting from me):
If the placeholder-type-specifier is ...
1
vote
0
answers
46
views
"auto" keyword not working properly in Eclipse during live code analysis?
I'm using Eclipse with the MinGW compiler. I have the following code snippet, which results in the error "Method 'push_back' could not be resolved", but surprisingly the code works. More ...
1
vote
1
answer
105
views
auto type dedection of `auto x = {1,2,3};` [duplicate]
Traditionally, people read a variable declaration/definition from left to right, for example:
std::vector<float> arr = {3.14, 1.414, 2.71, -0.2};
So the meaning of {3.14, 1.414, 2.71, -0.2} is ...
0
votes
0
answers
51
views
How do get Android Auto coordinates labels to work?
When I add coordinates in Android Auto, ( near my house in North Carolina ) the hey Google navigate to coordinate label ID sends me to another state over 1,000 miles away? Why doesn't it go to the ...
2
votes
1
answer
132
views
C++ auto template parameter deduction not working in GCC 14 unlike its older versions and Clang
The following snippet is accepted by GCC 13 and older, as well as all versions of Clang, but not by GCC 14. Either of the two suggested edits make GCC 14 accept the code as well.
#include <iostream&...
0
votes
1
answer
176
views
The object.getOwnPropertyDescriptor or the _valueTracker don't work. How to emulate the user input in the react form with multiple inputs?
I am creating a Chrome extension to auto-fill react forms. There is a form with multiple lines in the page. Each line has selection and input and can be deleted with a button.
I used the following two ...
25
votes
1
answer
3k
views
When is C++23 auto(x) useful?
I'm looking for a simple example when C++ 23 auto(x) could be useful.
This is what I have so far:
struct A {
A() = default;
explicit A(const A&) {} // copy constructor
};
struct B {
A ...
0
votes
1
answer
140
views
Docker auto tagging with Github Actions
So I have been tasked with setting up an workflow that automaticly tags docker images.
So for example, the first image has to use 1.0.0 and on a new push it needs to be 1.0.1 and so on.
Is there an ...
1
vote
1
answer
226
views
How to make negative implementation of auto trait not extend into composite types
I want to avoid unimplementing a given auto trait for composite types containing a type for which the given auto trait is unimplemented.
I have this auto trait for anything that isn't ():
pub auto ...
0
votes
2
answers
336
views
How to scroll to the bottom of console window in PyCharm2019 automatically?
I want to make my Python IDE->PyCharm, to scroll to the bottom of console window automatically,so that I can watch the latest output messages of my running code.
-2
votes
1
answer
93
views
How to get a variable and return multiple different datatype variable using auto in c++ [duplicate]
I have to convert a rvalue to integer, boolean or string i am unable to convert it is giving the error
error: inconsistent deduction for auto return type: ‘int’ and then ‘bool’
auto convertData(const ...
0
votes
1
answer
95
views
Handling Type Changes with auto in C++
A return type changed from const Bar& getBar() to const Bar getBar().
If i use:
const auto& bar = getBar();
and the return type changes. I have a reference on a temporary object.
If i use:
...
0
votes
1
answer
690
views
Python: How can i input lines read from a text file into a variable
I'm currently working on a python script to develop a automatic fill form bot. Only doing 1 site until i get the process down. As of the moment i have 2 options. Option 1 is to input the client data ...
2
votes
1
answer
256
views
Extend python enum in __new__ with auto()
I have a question related to using auto() with python enum.
I have a base clase like this:
class TokenEnum(IntEnum):
def __new__(cls, value):
member = object.__new__(cls)
# Always ...