Use Stack Overflow for Teams at work to find answers in a private and secure environment. Get your first 10 users free. .

Questions tagged [operation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
0answers
32 views

manipulate column name as “2010”, “2011” time stamp [duplicate]

After a spread in dplyr I have column names as 2010, 2011 - 2015. B %>% spread(TIME_PERIOD,MED) %>% mutate(IND2010 = 2010/2015 ) the str statement shows this: Classes grouped_df,...
0
votes
1answer
36 views

Serial OperationQueue with Operations synchronizing timer and sleep

I have a serial OperationQueue whose operations call usleep. I do this because the operation execution block synchronizes with a Timer that needs to repeat until a designated time. For example, 3 ...
0
votes
1answer
11 views

Which one is better performance wise?

Performance wise, which is better: a. filesizeInMB = filesize / (1024 * 1024) or b. filesizeInMB = filesize / 1024 / 1024
-4
votes
2answers
44 views

how to add subtract divide and multiply columns on a dataframe?

i hope you can help me. i need to get this result: for item in each row, create Max(In/Out Util)-1Mbr column with result: df['Max(In/Out Util)-1Mbr'] = [df['Max(In/Out Util)']/100*df['Egress ...
-1
votes
0answers
39 views

How to display 13th month salary and annual gross salary?

My program already ran with no errors or warnings, but somehow 13th-month salary and annual gross salary displayed incorrectly. It seems like the compiler skipped the arithmetic operations in my code. ...
0
votes
1answer
31 views

Problem creating a text file with name provided by input

i am creating a txt file based on user input,But it creates files without any format, i am new to python can anyone help me.. import os name = input("Name :") roll = input("Roll No :") branch = ...
0
votes
1answer
45 views

Simple program: squared module of a vector [duplicate]

I'm writing a simple program for the squared module of a vector, could you help me? I don't find anything useful for a beginner in fortran 2008, especially in these simple operations between arrays. ...
0
votes
1answer
23 views

Is there a long method operation for modulo if mod or % is not a supported function/operator?

This is related to the Zeller's Congruence algorithm where there is a requirement to use Modulo to get the actual day of an input date. However, in the software I'm using which is Blueprism, there is ...
-1
votes
2answers
65 views

completionBlock be called before the operation done

I have some code here: let queue = OperationQueue() queue.maxConcurrentOperationCount = 1 let types: [FeedTimeline] = [.special, .pr, .pickup, .lastPost] var operations: [Operation] = [] for type in ...
0
votes
1answer
31 views

Math Operations with Javascript in DIV created dinamically with classes

After creating divs dynamically with class="sizetot"; i want to reset it's values when the sum of each div created is > to a certain number (storagemax) picked correctly from the database with php. I ...
0
votes
1answer
23 views

How do I write a unit-test to throw an exception from the Mock method of Operation return type?

I would like to write a unit-test to throw an exception from the Mock method of Operation return type. I'm writing the unit-test with Spock in Groovy. There are class A, and B // class A private ...
0
votes
1answer
43 views

How to loop through entire dataframe/every cell in R?

I need to do a for loop and a true or false operation for each cell value in the table, if operation returns true, then the function is going to replace the value with 0. But the R throws me errors ...
0
votes
0answers
14 views

What is the term for a group of operations where some are floating point and others are integer operations?

I'm trying to label some data, but I'm not sure the proper unit to use in this instance, where both integer and floating point operations are being measured and compared. Would it just be "Operations"...
-1
votes
1answer
40 views

How do you increment a value while transforming STR in INT?

I use 2 tables "population" and "sous_nutrition" as I want to calculate the ratio of underfed (under_nutrition) people / countries. 'population' table has a 'year' column which displays INT values: '...
0
votes
2answers
56 views

why we are multiplying (temp>>11) with 2 to find the second in this code

/*program to display hour,minute,and seconds*/ #include<stdio.h> void times (unsigned int time); unsigned short hours, minutes, seconds; /*global variables */ int main () { int time; ...
0
votes
1answer
56 views

can't understand how does scala operation functions in Apache spark

hello everyone, so I started to learn about Apache spark architecture and I understand how the data flow works in higher-level. what I learn is that spark jobs work on stages that have tasks to ...
0
votes
1answer
39 views

I am having a problem with a foor loop that includes dataframes

I have a dataframe with 8 columnds. If two of those columns satisfy a condition, I have to fill two columns with the product of other two. And after running the algorithm it is not working. I have ...
0
votes
1answer
24 views

Compare against median of each column

How can I compare against median of each column in a pandas dataframe and result in true if the value is greater than median and false if value is less than median? Right now I am standardizing, so ...
1
vote
0answers
29 views

What does tf.get_operations actually return?

"tf.get_operations return the list of operations in the graph. You can modify the operations in place, but modifications to the list such as inserts/delete have no effect on the list of operations ...
1
vote
1answer
107 views

What does tf.keras.backend.dot does?

I am currently trying to implement LSTM in C. Therefore I need to understand https://www.tensorflow.org/api_docs/python/tf/keras/backend/dot. For example if I would call: dot([1,2],[3,4,5]) for(i = ...
1
vote
3answers
37 views

How to read the contents of a file with their specific data types and not as string in python?

I have a file with mark,19,2050.50,Chris,20,2010.40 as its content. If I read the file using open(), the contents are assigned into the file as textIOwrapper. If I split and store it in a list using ...
-1
votes
1answer
153 views

Using raster operations on OSM source in OpenLayers 5

var osmSource = new ol.source.OSM({ transition: 0 }); var rasterSource = new ol.source.Raster({ sources: [osmSource], operation: function(pixels,data) { ...
0
votes
1answer
40 views

What is the fastest way to apply ArcCos for each pixel in an image using Emgu in c#

Good morning, I am using a lot of operations on images with Emgu like Pow, Add, Sub, Mul. These operations work element by element between the two operated images. However, I see that the cos, acos, ...
0
votes
6answers
77 views

awk arithmetic operation from string

I have a specific column in a file which contains strings like this : 1.1*1024 1.0*1024 1.1*1024 ... I want the numeric result : 1126.4 1024.0 1126.4 So I tried this, please note that the sizes ...
1
vote
0answers
25 views

How do large teams manage their changelog

Using commit messages for changelogs is obviously terrible, and the suggested method from https://keepachangelog.com/ doesn't scale, but works well for smaller teams. Is there a library or a common ...
1
vote
0answers
9 views

Can the amount of files in a directoy make the read operation slower for one of the files?

I have a directory with 10 million files inside. I want to read a file of this dir without testing if it exists or not in the dir. Will this operation be affected by other files?
1
vote
2answers
77 views

Math operations individual elements in 2D Array - Swift

Im trying to perform different mathematical operations on individual elements of a 2D array (testArray) combined with 1D array (mod). Ive got the following for generating individual variables but ...
0
votes
2answers
45 views

SQL Bit operation, change second last bit to 0

i have a lot of rows with an bigint(length 20) and i have to change every second last bit to 0. For example i have: 0101 1011 and the result i need is: 0101 1001 The Problem is, the numbers are "...
2
votes
3answers
171 views

System.out.println behavior when using String and int together [duplicate]

Consider the below code snippet - public class Student { public static void main(String args[]) { int a = 3; int b = 4; System.out.println(a + b +" "); System.out....
3
votes
2answers
66 views

Is it possible to perform two different “+=” and “-=” operations in one line of code?

I have just started teaching myself java and I was wondering if there is an operation (maybe an "and then" operation) that will allow me to perform two mathematical calculations on the same line. It ...
-1
votes
1answer
68 views

Running massive calculation

I have a c# code like this Parallel.For(0, 10000, i => { function getThePassphase(int length){ } }); Use parallel method, it's capable of running my function "getThePassphase()" 10000 ...
0
votes
1answer
60 views

C++ Array unknown operation

Im reading over some code on github trying to understand what its doing. I came across this: for (int k = 0; k < N/GROUP_SIZE; k++) { for (int i = 0; i < N; i++) { for (int j = 0; ...
0
votes
1answer
36 views

Marketo landing page bulk operation through REST API

I don't have any knowledge on APIs and wanted to approve 200+ marketo landing pages which are in draft to approved. There is an REST API given by marketo on developer site but it contains landing page ...
-1
votes
1answer
92 views

Apt update failed when I using local repository

I deployed a local apt repository in LAN, the server IP is 192.168.88.96, by apt-mirror. Below is the config of /etc/apt/mirror.list. ############# config ################## # # set base_path /var/...
0
votes
0answers
35 views

iPhone xs Max background after 3 minute Operation not permitted

Build Information let path = NSSearchPathForDirectoriesInDomains(.documentDirectory,.userDomainMask, true).first! do{ self.db = try Connection("(path)/test.sqlite3") ...
0
votes
2answers
49 views

How can I build a command line interface which has operators with argparse?

How can I build the following with argparse: Synopsis: python3 program.py [operation] [options] target Operations: install, uninstall, update or remove (you choose one). I want the operations to ...
0
votes
0answers
947 views

Comparison (1) in R function returns possible only for atomic or list types

I have the following function: agegroup <- function(data, column) { setDT(data) if (class(data[[column]] == "integer")) { data[column <20, agegroup := "0-19"] data[column >= 20 &...
0
votes
0answers
38 views

Operation on rows in data.table

I would like to calculate automatically and introduce the row Qout, values as difference of TOTAL - C29. How to do this simply? DT <- data.table(induse = c("C29", "P7","TOTAL"), values = c(570,...
0
votes
1answer
30 views

How to do this bitwise operation question [duplicate]

Question: Provide the binary mask and bit-wise operations to complete the following tasks: Turn on bits 7,3,1 of an 8-bit binary number (1 is on, 0 is off). Toggle bits 6,5,4 of an 8 bit binary ...
0
votes
0answers
12 views

Spring cloud - zipkin span numbers

I have Zipkin and 4 microservices that is calling in chain like below: 1 -> 2 -> 3 -> 4 Why Zipkin console prints 815.307ms 7 spans instead of 4 spans? When i click to "815.307ms 7 spans" link I ...
0
votes
0answers
12 views

Larman's system operations contacts for lists

I have some confusion with applying Larman's system operation contracts (OO Analysis from book Applying UML and Patterns) on Lists. More precisely, I'm confused with postcondition part. For example, ...
0
votes
0answers
96 views

How to store an operator in an array?

I'm trying to store one of 3 random operators (+ or - or combine the preceding and succeeding entries in the list) in an array then call it back out later to perform an operation. Ultimately I want ...
0
votes
1answer
62 views

Swift - Certain amount of URL Request per second without Timer

How to send 3 request per second without Timer ? oq = OperationQueue.main oq.maxConcurrentOperationCount = 1 oq.qualityOfService = .background oqSession = URLSession(configuration: ....
0
votes
3answers
82 views

How to get x values as a pair on a dataframe in scala?

I have a dataframe with 27770 entries in scala using spark. This dataframe contains only one column of integers. I want to combine this column by itshelf in order to generate a new dataframe with ...
-1
votes
1answer
114 views

Definition of operation and method in OOP [closed]

I'm searching for a concrete definition of operation and method independent of the programming language. In my understanding: Operations just specify which functionality an object supports without ...
-1
votes
1answer
33 views

How to take two binary numbers and operation from user and give answer

i am doing an assignment on c programming that operates(+,-,*,/) on two binary numbers for example if the user inputs : " 1001 + 1010 " must add two binaries and give output "010011" my code can ...
0
votes
0answers
13 views

Arithmetic on null and blank

I am now creating a web service [non-programing-development-enviroment] (a web-system to create a web-system) on that enviroment I would like to define the Arithmetic operation including null(blank) ...
0
votes
1answer
66 views

a function that works with arrays

I need your help to write a function that does the following: It recieves 2 pointers (type double) ; one points on the first element of an array, the ther one points behind the array. This pointer ...
2
votes
1answer
46 views

Emacs : Search and replace operations

I'm looking for a way to search and replace regexp with Emacs while also doing operations. I don't really know how to explain it but here is an example : Let's say I have this code going on for 200+ ...
0
votes
0answers
41 views

What is the time cost of an addition versus a multiplication?

I have two algorithms: A() and B(). These perform some amount of arithmetic operations: A(): - n-1 additions - n subtractions B(): - n-1 additions - n subtractions - n squares (power of 2) - 1 ...