Questions tagged [method-signature]

In computer programming, especially object-oriented programming, a method is commonly identified by its unique method signature, which usually includes the method name, and the number, types and order of its parameters. A method signature is the smallest type of a method.

Filter by
Sorted by
Tagged with
0 votes
0 answers
127 views

In Delphi method signatures, why can't Generics be combined with arrays?

While attempting to revise one of my records to use Generics, I discovered that combining Generics and arrays within one of the methods' signatures produces an error: Type [type] is not yet ...
Matthew Milone's user avatar
5 votes
1 answer
86 views

What's the format for `objc_method_description.types` for swift blocks?

The Objective-C method encoding produced by the Swift compiler for swift methods with blocks seems to use syntax not documented anywhere. For instance the method: func DebugLog2(message: String) async ...
Rolf Bjarne Kvinge's user avatar
0 votes
1 answer
232 views

pythonnet clr: how to get the signature of a function/method?

When importing a .NET library in Python with: import clr clr.AddReference(r"C:\foo.dll") from foo import * my_foo = Foo() print(my_foo.my_method) # <bound method 'my_method'> I'd ...
Basj's user avatar
  • 41.6k
1 vote
0 answers
85 views

Where does PowerShell retrieve Intellisense/AutoComplete information from (specifically for .NET class methods)?

In the console, if I type [string]::Concat( and press CTRL + SPACE I can see every method overload. Where exactly does PowerShell retrieve this kind of overload definition/syntax information from? PS ...
Paul π's user avatar
  • 148
0 votes
0 answers
46 views

Ethereum address length 32 bytes result (how to change it)

When trying to get the balance of an Ethereum address, I get the error: *ERROR Error: Uncaught (in promise): Error: Private key must be 32 bytes in length.* The line for the signature is: var signed = ...
Arrakasta Lasai's user avatar
1 vote
1 answer
36 views

Can a function type accept intersected types as arguments in TypeScript?

Say I've got these types defined: export type Event = { name: EventName, timestamp: Timestamp, }; export type EventWithMetadata = Event & { deviceId: ID, }; I'm looking to define a common ...
Nick Sweet's user avatar
  • 2,050
0 votes
0 answers
112 views

A problem occurred evaluating project ':app'. > No signature of method: build_d5r6pfvnihwiuw22fy3h0genq.android() is applicable for argument types:

I an trying to generate abb bundle in flutter but got this issue and not able to solve it. I got this error and trying to solve it, something is extra in build.gradle and i have to remove this for ...
sonalika's user avatar
  • 153
0 votes
1 answer
92 views

Separated (decoupled) API (a creator class) for the classes of a library with constructots having different signature

I have a library for 3D geometry. The library has classes like Point, Vector, Axis, Plane etc. The library has an interface and implementation hierarchy but simply all classes inherits from ...
Baris's user avatar
  • 13
1 vote
0 answers
48 views

How to define the signature of a function that returns an object while passing props using interfaces?

I am working with (.ts) and I have defined a component where my major stylings are. I am importing an another component inside of it where I want to pass these styles as props. The styles I made into ...
Himanshu Sharma's user avatar
0 votes
1 answer
61 views

The parameters (number[]) don't match the method signature for DocumentApp.Body.appendTable [duplicate]

In Apps Script, create a menu where the user selects a range of cells and hits a button that activates the following function. With: var dataRange = dataSheet.getActiveRange(); var dataValues = ...
Alejandro Capra's user avatar
1 vote
2 answers
571 views

What the heck is a dbus argument of type a{sa{sv}} in the Network Manager API?

I'm looking through the dbus api for Network Manager and there are methods with inputs of type a{sa{sv}}. I'm still new to dbus but if I'm interpreting the definition of signature specifiers in https:/...
davolfman's user avatar
  • 266
-1 votes
1 answer
87 views

Is there shorthand to specify a specific overload when passing a function as a closure-based argument?

I'm wondering if Swift has a way to let you pass in a specific overload of a function as an argument to a second function that takes a closure with a matching signature, based on type, but without ...
Mark A. Donohoe's user avatar
2 votes
0 answers
71 views

How do I read or interpret the Angular ngrx documentation correctly?

I have the createAction function from ngrx.io Store... with that signature: https://v11.ngrx.io/api/store/createAction createAction<T extends string, C extends Creator>(type: T, config?: C | { ...
MMMM's user avatar
  • 3,350
0 votes
0 answers
79 views

How to view the actual objc method signature in swift?

Example of code: /** Device types. */ typedef NS_OPTIONS(NSUInteger, STDeviceType) { /** The device is not defined. */ STDeviceTypeNone = 0, /** Real device. */ STDeviceTypeHardware = 1 &...
Вячеслав Герчиков's user avatar
1 vote
1 answer
745 views

Why is my Numba JIT function recognized as an array?

So I am trying to speed up a code, and while it works for most functions, a few do not work. I specify the function's signature, and it doesn't work. If I write only nb.njit, it works, but there is no ...
Bilal BOTTÉ's user avatar
1 vote
1 answer
470 views

Why class constructor doesn't have attribute __code__?

I have simple python3 class: class A: def foo(self): pass print(A.foo.__code__.co_argcount) print(A.__init__.__code__.co_argcount) OUTPUT will be: 1 AttributeError: 'wrapper_descriptor' ...
CH...AT's user avatar
  • 11
1 vote
1 answer
909 views

The return type / return value is part of the signature of the method?

C# documentation Methods states Methods are declared in a class, struct, or interface by specifying the access level such as public or private, optional modifiers such as abstract or sealed, the ...
DJango's user avatar
  • 13
82 votes
3 answers
9k views

What is double exclamation mark in C#?

From https://source.dot.net/#System.Private.CoreLib/Hashtable.cs,475: public virtual bool ContainsKey(object key!!) It looks like two null-forgiving operators. Is there a document about it?
shingo's user avatar
  • 18.8k
0 votes
3 answers
3k views

Apps Script Google Calendar API Integration String Class Error

I'm super new to JavaScript, am a marketing executive by trade, but need to create a Google Calendar view from a Google Sheet for our content calendar for myself. After following some YT tutorials and ...
Vanessa Goh's user avatar
-1 votes
1 answer
332 views

0auth_signature using SHA1-RSA in java

In have integrated oauth1.0. i am using sha1-rsa signature method. i have generated oauth signature. i got 200 status but i did not get any value in service provider. my doubt is signature generation. ...
Ilakkia s's user avatar
0 votes
0 answers
100 views

How to get the number of parameters required to run a script?

I am developing a project in Python to automate tasks. Very often I have to run scripts from different programming languages (Python, Perl, Ruby, C...) directly in my project. For that, I use the ...
Antoine Hazebrouck's user avatar
3 votes
1 answer
1k views

Lombok extension methods: Prevalence/priority?

First off: I absolutely LOVE Project Lombok. Awesome tool! There's so many excellent aspects to this 'compile time' library. Loving the @ExtensionMethods, I have already hit this 'feature' a few times,...
JayC667's user avatar
  • 2,441
16 votes
5 answers
46k views

How do you fix the following error : A problem occurred evaluating project ':app'. > No signature of method:

I am getting the following error when trying to run my react-native app with android and I am unsure why, any ideas? *Where: Build file '/Users/ahmeeyagoldman/Documents/TikTok/android/app/build.gradle'...
Ahmeeya Goldman's user avatar
-2 votes
1 answer
131 views

How to read a TypeScript signature with multiple arrows and generics?

I am trying to understand this TypeScript signature from react-hook-forms: handleSubmit: <TSubmitFieldValues extends FieldValues = TFieldValues>(onValid: SubmitHandler<TSubmitFieldValues>, ...
stefan.at.kotlin's user avatar
3 votes
4 answers
113 views

Can I query a Near contract for its method signatures?

Is there a way to query what methods are offered by a given NEAR contract? (So that one could do autodiscovery of some standard interface, for instance.) Or do you have to just know the method ...
Mykle Hansen's user avatar
0 votes
0 answers
65 views

Java Language Design Decision: Multiple interfaces with same signature, but different return types

I'm studying for the 1Z0-819 exam and learned that a class cannot implement two interfaces having the same signature (method name + param type list) but different return types. I know there are ...
John Fisher's user avatar
0 votes
0 answers
234 views

TypeScript decorator changing function signature

I think this is probably a bit of a long shot, but here goes. I'd like to create an artificial signature for a function that is being altered by a decorator. @route('blar/blar') someAction(route: ...
kim3er's user avatar
  • 6,326
-1 votes
1 answer
58 views

What C# conventions are there for combining parent and child method outputs? [closed]

I'm learning C# after many moons in JavaScript land (just for some reference). I read the C# inheritance introduction as well as when and when not to use new/override and (excuse the ignorance) am ...
GrayedFox's user avatar
  • 2,386
0 votes
1 answer
58 views

Why is Typescript giving me an error in generic index signature

I have two types defined like this: type Type1 = 'A' | 'B' | 'C'; type Type2 = 'D' | 'B' | 'F'; I have create 2 objects using these types like so: const TYPE1 : { [ id in Type1 ] : { label : string;...
Marek Krzeminski's user avatar
0 votes
1 answer
71 views

Following a course - I just saw a strange parameter usage in a function

I'm watching a C# course and I've just seen a strange usage of bool inside a parameter. I'll show a screenshot of it: What does that mean? I've never seen anything like this before.
Octavian Niculescu's user avatar
0 votes
0 answers
233 views

AspectJ pointcut method signature in Java code

I have defined an Aspect with the following pointcut pointcut transactedMethod() : TransactionBoundary.transactedMethod(); This is an alias created for all transactional methods with some error raised ...
Vikash Jain's user avatar
-1 votes
1 answer
293 views

Why doesn't Java support adding `throws` to the method signature? [duplicate]

This is a question that is being around in my head for days. When it comes to inheritance and polymorphism, Java support covariant return types through the bridge method concept. But why doesn't ...
Clarke's user avatar
  • 185
2 votes
1 answer
69 views

Java pattern for interfaces and RuntimeExceptions

I am using the following pattern in a project of mine. public interface Foo { // When given a positive number, double it public Integer doublePositiveNumber(int number); } public class FooImpl { ...
Duke Silver's user avatar
  • 1,539
4 votes
3 answers
5k views

Python overriding type hint on a method's return in child class, without redefining method signature

I have a base class with a type hint of float on a method's return. In the child class, without redefining the signature, can I somehow update the type hint on the method's return to be int? Sample ...
Intrastellar Explorer's user avatar
27 votes
3 answers
64k views

How do you resolve a "The parameters (number[]) don't match the method signature for SpreadsheetApp.Range.setValues" error

I am getting this error: "The parameters (number[]) don't match the method signature for SpreadsheetApp.Range.setValues." in my Google Apps Script when I try to write an array of values to a ...
Nico's user avatar
  • 275
0 votes
1 answer
184 views

How can I fix this TypeError when fitting ODE with scipy?

I would like to adjust parameters of a simple ODE using the scipy package. I have the feeling that it is bearable. I am aware about this post but I think my question is different. First we import ...
jlandercy's user avatar
  • 7,248
0 votes
1 answer
2k views

Exception error relating to method signature

I'm super new to JavaScript, am an editor by trade, but need to create a Google Calendar view from a Google Sheet for story assignments for my writers. I've gone through a tutorial on how to make this ...
SueTroy's user avatar
0 votes
1 answer
152 views

How can I use wrapt.decorator adapters to change the signature of unbound methods?

Below is a MWE of my attempt to change the signature of MyClass.func from (self, a, b, c) to (self, x, y, z). As you can see from the outputs, the change_sig decorator works on functions and also ...
Ben Fogelson's user avatar
0 votes
0 answers
938 views

How to add non-default parameters to a child method?

I have a parent class with default and non-default parameters. The child class has the same method, and I would like to add one more non-default parameter. class Parent: def func(self, arg1, ...
theletz's user avatar
  • 1,733
8 votes
2 answers
199 views

Overload resolution, which method is called

Lets suppose I have a ComponentBase class, who is child of ObjectContextDecorator and grandchild of ObjectContext. public class ComponentBase extends ObjectContextDecorator { } public class ...
Gabriel Robaina's user avatar
1 vote
3 answers
126 views

How can I set a default file handle in a perl subroutine signature?

I have a subroutine, use experimental "signatures"; sub foo { my $fh = +shift; open ($fh, '>', 'default_file') unless defined $fh; } I would like to port that to subroutine signatures. Is ...
Evan Carroll's user avatar
  • 78.7k
0 votes
1 answer
443 views

Qualified electronic signature

Can someone help me with the qualified electronic signature and make me a graph to understand the different interactions please ? I try to set up a qualified electronic signature in my company but I ...
Khera Mezioud's user avatar
18 votes
1 answer
35k views

Sheet.getRange throwing signature mismatch exception when not using A1 notation

I'm writing a script on a Google Sheet that will be interacting with Google Map's Geocoding service. The following code works correctly. var ss = SpreadsheetApp.getActiveSpreadsheet(); var header_v = ...
Benjamin Didur's user avatar
0 votes
1 answer
67 views

Error while calling interface parameter method with implemented class

I have a method that receives 2 parameters: List of interface. I get an error when I try to call this method with List of class that implements that interface. The input must be of type class, I don'...
assaf.gov's user avatar
  • 517
3 votes
0 answers
2k views

Can I let swagger-codegen ignore some method parameters

I use swagger-codegen in my maven build to generate the Java interfaces for my REST layer. This works very well. However, there are a couple of parameters that I would like to exclude from the ...
neXus's user avatar
  • 2,005
4 votes
3 answers
588 views

Interface for println(String)

I'd like to write Java code (say, a method) that will print some lines. The object onto which to print shall be provided by the caller. I'd like my code to not care what exactly that object is and ...
das-g's user avatar
  • 9,728
10 votes
2 answers
179 views

Perl 6 multi methods never match expected signature

I have a class with two multi methods (multi submit). I call my multi like this: $perspective.submit(:message($message.content)); Which gets shipped off to my class: my $perspective-api = API::...
kawaii's user avatar
  • 301
0 votes
1 answer
139 views

How can I define class methods OUTSIDE of the class' brackets to improve readability?

How can I define class methods OUTSIDE of the class' brackets to improve readability? E.g., something similar to this... class MyClass { //Private variables: int _foo = 0; //Private ...
Landon's user avatar
  • 528
1 vote
1 answer
51 views

Error: Cannot invoke an expression whose type lacks a call signature. (BehaviorSubject)

I can supply a dummy application that demonstrates this, but it boils down to the following: Service file: dialog.service.ts import { Injectable } from '@angular/core'; import { BehaviorSubject } ...
Yogi Bear's user avatar
  • 943
0 votes
3 answers
343 views

How to define a method with Integer parameter (path placeholding)?

Preface I'd like to saying two things: I don't know how to phrase this question in a few words. So I can't find what I'm looking for when searching (on stackoverflow). Essentially, I apologize if ...
General Kipicus's user avatar

1
2 3 4 5