Skip to main content

All Questions

Tagged with
1 vote
1 answer
22 views

ComputeError with polars dataframe while trying to pass a column expressions in a simple shift() operation

Sorry, I'm starting out in Polars. Is there a way to achieve the same functionality of the shift(n) function where n is a dataframe variable. When I try: df = pl.DataFrame({ "a": [1, 2, ...
user23486287's user avatar
-2 votes
1 answer
89 views

Fonction skip bool and doesn't calculate [duplicate]

Welcome in my misery. I'm a novice/beginner in coding :) I've been trying to write a calculator that detects anomalies in the input provided. My first problem was to neglect any letters and that was ...
TheAX 0198's user avatar
8 votes
2 answers
150 views

How to introspect a Raku operator?

I can introspect routines in Raku, for example the say routine: [5] > &say.WHAT ...
anquegi's user avatar
  • 11.4k
0 votes
2 answers
303 views

Are operators in C implemented as functions like C++?

I was reading a tutorial on operator overloading in C++ when I saw this: In C++, operators are implemented as functions. By using function overloading on the operator functions, you can define your ...
user21290559's user avatar
-5 votes
2 answers
490 views

Write a function definition named quotient that takes in two numbers and returns the quotient of dividing the first argument by the second argument

I am taking an assessment for JavaScript and I am stuck. I have tried tweaking and moving things around with no luck. Basically it is a series of questions that once answered correctly moves onto the ...
Gail Cruz's user avatar
0 votes
4 answers
126 views

Python script that increases a number by a percent and then with a new number till goal

I found this problem and wanted to try to execute, but got stuck: Compile a program that allows you to determine how many days will be enough for 200 something if consumed on the first day 5 tons, but ...
Pmileika's user avatar
1 vote
2 answers
91 views

Understanding how the "is" operator works int Python for result from function

For example we have this code. x = 1 y = 1 print(x is y) # TRUE print(id(x), id(y)) y = pow(10, 30, 10**30-1) # 1 print(type(y)) print(x, y, x is y) # FALSE It`s return: True 140516304938720 ...
Ли Шеньшунь's user avatar
0 votes
2 answers
74 views

JavaScript: rest operator function returning NaN

I'm trying to resolve some FCC tuts. The function should be very simple, a sum function for args as an array, using the rest operator. However I don't get why my answer doesn't work, here is the code ...
user20309501's user avatar
0 votes
1 answer
959 views

How to make a function which multiplies two values

So, I was writing overly complex answers for simple problems on Codewars as I often do, and one of the problems was, Multiply two numbers It wanted me to put: return a * b But I wanted to make a ...
Isaac Heinze's user avatar
-2 votes
2 answers
55 views

Why can't I pass operator to a function from an other in C++?

In my C++ homework (where I have to short different arrays with different methods), I run into a problem. I can't pass comp() from one function to another. Here is a simplified version of my code: ...
Dodande's user avatar
  • 99
-4 votes
1 answer
109 views

Difference between -- , -= 1 and - 1

I have been working through some freeCodeCamp exercises and while working on a recursion problem in which all the numbers between a given range have to be added to an array (including both the numbers)...
Suryasish Paul's user avatar
1 vote
2 answers
458 views

Making variables available inside environment with load function in Lua

This question has some reference to the question Defining logical operator implies in lua. The following code works fine. local function _implies(a, b) if a == 1 and b == 0 then return 0 ...
mathsbeauty's user avatar
-1 votes
2 answers
99 views

How do i find the number of projects that two employees with specific names that have worked together? (using LIKE operator )

Let's say I want to find the number of projects the 2 employees Jim Sullivan and Anna Schimdt have worked on together. We have 3 tables employees, workson, project. Employees employeeid name 110 Jim ...
youfacejaraxxus's user avatar
0 votes
0 answers
29 views

What does %_Arguments(0) do in javascript? [duplicate]

Wondering why string concatenation is faster than array join, I came across this post which features the following code: // ECMA-262, section 15.5.4.6 function StringConcat() { if (...
Adrian's user avatar
  • 1,771
0 votes
2 answers
31 views

Define a factory function that accepts a set of operators as inputs

I have been working on a simple calculator app using client side javascript and have implemented the program logic for the basic mathematical operations +, -, x, /. The code is implemented as callback ...
Colin's user avatar
  • 13

15 30 50 per page
1
2 3 4 5
10