Questions tagged [operations]

298 questions
1
vote
1 answer

Avi networks - AWS policies for controller

We are using Avi networks in AWS and I have set up a controller instance with liberal (Admin) policies. I would like to clamp down on the permissions afforded to this controller instance by it's role. Which policies should I assign to this…
mattdlh
  • 35
  • 5
1
vote
2 answers

Conversion of Degrees to Radians for use in trig functions in C

I want to use the trigonometric functions of math.h to use 0,1,-1 as sign identifiers for a plane coordinate system. cos(pi)*length = -1*length sin(pi)*length = 0 But the functions in math.h requires radian values while I have degree values.…
1
vote
0 answers

ndk And-operation between GLuint and a GLuint-type macro

i encountered a problem when i try to do a and-operation between a GLuint variable and a macro which type is GLuint. Description: The environment is jni programming on android platform I make sure i include the header paths the project…
1
vote
5 answers

Python: Creating a month() function to take 1 - 12 as input and return corresponding month

I am currently trying to create a month() function that will take the numbers 1 through 12 as input and return the three character abbreviation of the corresponding month. I need to do this without the use of an if statement, and using string…
Joe Dingle
  • 123
  • 1
  • 4
  • 12
1
vote
0 answers

AFNetworking batch POST request over 3g fail

I am using the below code as part of an initial sync and pull to refresh sync code for an app. When the device is running under 3g the POST calls are timing out and I am receiving an error: Code=-1005 "The network connection was lost." After…
1
vote
1 answer

bit comparison in loop on AVRs

I'm learning about bit logic in C on AVRs and I have a problem. I want to compare an "i" bit (from the right) from int8_t variable and if it is 1, then do the next instruction, but it doesn't work. Here's what I write: if (variable & (1<
Lexander
  • 184
  • 2
  • 10
1
vote
1 answer

postgreSQL (time1 - time2) vs (-time2 + time1)

So I am working on a database for airports and i want to find the duration of flight. There is a table named flight that has id... dep_time(departure time), arr_time(arrival time) declared as time without time zone. The problem is that one of the…
PROvlima
  • 541
  • 1
  • 4
  • 9
1
vote
2 answers

operation specified in binding is not defined for 'Porttype', but it is there, wsdl.. help

this thing is driving me crazy... Whenever I try to validate it.. it gives me error at complete definition is below... that "The operation specified for the 'Binding' binding is not defined for port type…
bandit
  • 95
  • 1
  • 1
  • 8
1
vote
1 answer

Assembly operations with inputed number

I'm learning Assembly in University and even though I just started I decided to dig deeper and I made some cool programs so far. My latest one was an Encrypter/Decrypter. It works by reversing the string you want to encrypt and then increase every…
Tiagofer
  • 45
  • 1
  • 1
  • 5
1
vote
1 answer

Counting Primitive Operations & Calculating Big-O Notation

I've written a piece of java code that when given an array (arrayX), works out the prefix averages of that array and outputs them in another array (arrayA). I am supposed to count the primitive operations and calculate the Big-O notation (which i'm…
Phillip
  • 59
  • 3
  • 9
1
vote
3 answers

Different result of operator precedence in Java and Python

I notice that I have two different result when I compile this operation in java, and python. 10 / 3 + 2 * 4 / 3 - 3 result in java = 2.0 in python = 3.0 I also execute this operation in many calculators and the result is 3.0 can anyone…
user3417593
  • 33
  • 1
  • 7
1
vote
1 answer

Counting/Calculating Primitive operations of a for loop within a for loop

I have the Algorithm: Input: X, a 1-D numerical array of size n Let A = an empty 1-D numerical array of size n For i = 0 to n-1 Let s = X[0] For j = 1 to i Let s = s + X[j] End For Let A[i] = s /(i+1) End For Output: An…
1
vote
1 answer

Strange behaviour with vector operations in MATLAB

I have a formula F = (-k.^(3/2) .* sqrt(4 .* c .* x + k) + 2 .* x .* k .* c + k.^2) / (2 .* c) and i'm trying to plot F against a range of values of c for a constant x and k value like so: x = 0.01; c = 10000:10000:100000; k = 100000; F =…
JavascriptLoser
  • 1,853
  • 5
  • 34
  • 61
1
vote
2 answers

Is There a Term for Database Operations That Don't Change Data?

Is there a catch-all term for database operations that don't alter any data at all? For example, SELECT statements have no effect on the contents of the database. On the other hand, INSERT, UPDATE, and DELETE statements have the potential to create,…
Chris Schiffhauer
  • 17,102
  • 15
  • 79
  • 88
1
vote
0 answers

In which cases put a process itself in an sleep ?

I really would like to know about some cases that a process put itself in a sleep. What would happen for example in following cases? Would the process put itself in a sleep? and why ? Multiply of big number of values Waiting for user…