397 questions
4
votes
2
answers
145
views
Can I instantiate an object in PowerShell and set a property in a single command?
I know how to instantiate object in PowerShell but I am struggling to find out if its possible to instantiate an object and set one of its properties in the same command.
The following commands work ...
0
votes
1
answer
144
views
How is the return value of a method ignored in Java? [closed]
I'm trying to understand how the return value of the HashSet.add() method is handled in Java when it's not used in a condition or assigned to a variable. Here's an example of what I mean:
Set<...
0
votes
0
answers
177
views
Why is my Telegram Bot callback query handler not working?
I am developing a Telegram bot using the telebot and I have encountered an issue where the callback query handler is not triggered when I click on an inline button.
from telebot import TeleBot, types
...
1
vote
1
answer
42
views
`quote()` and `call()`: How to distinguish between both outputs?
Motivation
I am programming a function that takes a call as an input. I notice however that R has two different ways to create calls, either through call() or quote(). My code behaves differently ...
2
votes
3
answers
124
views
What kind of PHP syntax is this? [duplicate]
Can you please tell me what kind of PHP syntax is:
echo Html::{'div.my-class#my-id'}('This is element content')
?
It's from https://github.com/decodelabs/tagged library.
I mean I know what it does, ...
0
votes
0
answers
54
views
How do I add value to my Method call from my Sub class to Main?
The string value seems to appear yet I can not add a value to my calculations in the fulltime and part time.
This is the Main class for my inheritance
import java.util.Scanner;
public class ...
1
vote
1
answer
142
views
How to avoid infinite loops in a function call in assembly?
I am writing a program in assembly for x86-64 microprocessors in 64-bit mode, and that calls a function f in a loop 5 times which in turn calls puts in a loop 3 times to display "hello
world"...
1
vote
1
answer
70
views
How do I use a bat file to call other bat files which are in different folders as I keep getting errors
So I am trying to write a bat file that calls 3 different bat files in 3 different locations.
My CallAll batch file is saved in the location:
"C:\Users\Documents\CallAll\CallAll.bat"
This ...
0
votes
1
answer
43
views
How do I call an inner function in one py file from another py file?
Trying in a loop_file.py to import an inner function defined in stats_file.py, imported in shared_data.py file, but I experience only to be able to call the outer function. shared_data.py file is used ...
3
votes
0
answers
104
views
Problems configuring latest Serilog from appSettings.json
I am using Serilog and getting the configuration from the appsettings.json file. I need to update the following code, which worked with an earlier version of the Serilog library but does not work with ...
1
vote
2
answers
200
views
How do the double colons `::` work under the hood in case we use them for method call?
This is a theoretical question. I know that I can call a method by using ::. It is rarely used, but possible. For example:
user = User.new
user::name
The question is: How it is working under the hood?...
1
vote
0
answers
203
views
Calling native Kotlin code from Flutter. MethodHandler issue
I want to be able to call a MethodChannel so I can retrieve and send data between Flutter and a 3rd party app but when I do so I get these errors from my Firebase Messaging and Flutter Local ...
1
vote
1
answer
263
views
Why does GetType() return Object[] as the type on array, but a bad method call error says it is the type that is in the 0th element in the array?
So, I create an array, call GetType(), and I (reasonably) get the answer Object[]. If I, however, give it a bad method, I get the type of the 0th element in the error message.
Just trying to ...
0
votes
1
answer
92
views
What is the idiomatic way to combine member function calls with other function calls in Scala? [duplicate]
Say we have an object (e.g. a list) in Scala, and we want to sequence user-defined functions with object member functions, for instance:
g(l.map(f)
.foldRight(...))
.map(h)
If the sequence of ...
2
votes
1
answer
148
views
How does CMD.exe execute Call on a given label inside a batch file?
Suppose I have a batch file.
This batch file has a 'subroutine' labeled :AppndLog and it's purpose is to append a log file.
This routine starts at line - let's say 540. Now - other 'subroutines' ...