Questions tagged [invalid-argument]
263 questions
-1
votes
1 answer
How to convert String to date type using fromLocaleString() function?
I need to convert the time chosen on two tumblers to date QML type. I want the resulting date to be returned via a function alarm_time().
I am using the Date.fromLocaleString(locale, dateTimeString, format) function for conversion. According to the…

sweak
- 1,369
- 2
- 6
- 21
-1
votes
2 answers
Throw an exception when the parameters of a constructor are of the wrong type
I want to build a class that throws an exception if the parameter list is of the wrong type,
For example this class:
in the header
class rectangle
{
public:
rectangle(int, int);
int getarea();
private:
int length;
int width;
};
in…

Dave
- 43
- 2
-1
votes
2 answers
file_get_contents() error: failed to open stream : invalid argument
$i = 0;
$name_url = '../../accounts/full/'.$frd_array[$i].'/profile/name.txt';
$name = file_get_contents($name_url);
$user_id = file_get_contents('../../accounts/full/'.$frd_array[$i].'/profile/user_id.txt');
$status =…

Shaikh Amaan FM
- 312
- 4
- 12
-1
votes
1 answer
R - getting the error: "Invalid argument: 'sim' & 'obs' doesn't have the same length !"
I've been learning R in R Studio and have been working on simple prediction modeling.
I receive the following error:
Invalid argument: 'sim' & 'obs' doesn't have the same length !
when I run this line of code:
rmse(testingbabydata$weight,…

Fidel Mercado
- 3
- 1
-1
votes
1 answer
Why am I getting this error breaking my program? C++
I have a program for my c++ class that for some reason keeps breaking when I get to a certain point in my program.
Here is the header file of my
// This class has overloaded constructors.
#ifndef INVENTORYITEM_H
#define INVENTORYITEM_H
#include…

Hunter Thompson
- 1
- 1
-1
votes
1 answer
Invalid type of argument using pointer to struct array
I have a problem with the next code, I get the error: invalid type argument of unary '*' (have 'int'). If I write int *content that allows the code to run, but I have to write int=content and change the code *((ptab->content)+pC1+17), I tried but I…

dilver
- 55
- 2
- 11
-1
votes
1 answer
Invalid syntax, but no clue why
Hey I have this simple code for a Haversine Formula (without radial conversion), but it keeps giving me the error of invalid syntax.
I looked everywhere but cant find any solution. It should work!
import math
def distance(lat1, lat2, lon1,…

Jan
- 11
-1
votes
2 answers
Invalid Argument, Not sure why
Here is a bit of my code.
drawingContext.DrawEllipse(this.handOpenBrush, null, handPosition, HandSize, HandSize);
That code works fine.
Though, as soon as I do this, I get the errors that it has some invalid…

dyllandry
- 113
- 1
- 11
-1
votes
4 answers
iOS-error in parsing the data
In my app, I am parsing the data using JSON
NSString * urlString=[NSString stringWithFormat:@"http://userRequest?userid=bala@gmail.com&latitude=59.34324&longitude=23.359257"];
NSURL * url=[NSURL URLWithString:urlString];
NSMutableURLRequest *…

chandru
- 407
- 1
- 5
- 26
-1
votes
2 answers
Still Need Help! The best overloaded method match for 'XDevkit.IXboxDebugTarget.GetMemory(uint, uint, byte[], out uint)' has some invalid arguments
Possible Duplicate:
The best overloaded method match for 'XDevkit.IXboxDebugTarget.GetMemory(uint, uint, byte[], out uint)' has some invalid arguments
Not sure why this is being voted down, I just need help. I have been struggling with this for…

user1205336
- 15
- 1
- 5
-1
votes
1 answer
Warning: Invalid argument supplied for foreach()
I need a help to clarify why I get this warning.
data: [/* DATA…

Danis
- 1,978
- 3
- 16
- 27
-2
votes
2 answers
Yii2 Invalid argument supplied for foreach() in BaseArrayHelper.php
I'm using Yii2 Advanced Version.
I have an error but I couldn't find how can I fix that.
Can you help me please?
The error said :
Warning: Invalid argument supplied for…

CBE
- 1
- 1
-2
votes
1 answer
Invalid Argument Exception when attempting to convert string to integer
I'm working on a project for class and I keep having the same error with a single line. I've tried asking classmates for help but I've been unable to get it working. When reading data from a file, the program is supposed to convert each line into…

rosa
- 1
- 2
-2
votes
2 answers
invalidArgumentError: when i upload file using google app script
I am trying to upload the file "pdf " to google drive through google app script, but I get an error when I click the button. Also, I wanted to use the array bytes but I don't know how to do because without the array bytes I must disable the chrome…

Nasaf
- 25
- 8
-2
votes
1 answer
throw does not show error msg c++
Final update: Thank you for all the comments and help. I went back to the textbook and copied the whole code to run their program, and realized their throw message never appeared, I assumed there message would appear which is why I was expecting a…

jaye31987
- 13
- 5