Questions tagged [operations]

298 questions
0
votes
1 answer

Algorithm to Authenticate Online Operations

I need an idea to develop a secure algorithm to authenticate online operations using PHP in the server and an Android app in the user's device. What is the idea? The user try to login in the system. The server sends a confirmation request to user's…
Lucas NN
  • 758
  • 5
  • 16
0
votes
3 answers

Bits exchange trouble C#

I have to write a program that takes bits 3,4,5 and puts them into the place of bits 24,25,26 and then it takes bits 24,25,26 (from the original number) and puts them in the place of bits 3,4,5. The code that I wrote succesfuly transfers 3,4,5 to…
Darkbound
  • 3,026
  • 7
  • 34
  • 72
0
votes
1 answer

Simple operations in binary

How would you perform the mathematical operations +, -, *, / and % in binary using only AND, OR, NAND, NOR, XOR and so on? I'm not knowledgeable on binary at all, I only really know what the operations do in the most basic sense and how to count up…
Beta Decay
  • 805
  • 1
  • 8
  • 20
0
votes
5 answers

how can i do math operation on list elements in python?

Suppose i have list of numbers [3, 51, 34]. I want to add to each element the sum of the previous elements and return a new list with these new values. So here the result would be [3, 54, 88]. How to do it in general on an arbitrary-sized input…
user3549209
  • 21
  • 1
  • 2
0
votes
2 answers

How do I prevent two arrays from becoming equal when performing calculations on only one?

I'm trying to perform calculations on an array to sort it between greatest and least so that I can then compare it to the country it's associated with. I'm trying to do this by keeping one array variable in it's original format, while sorting a…
0
votes
4 answers

Operate between datetimepickers

I am trying to get the difference between two datetimepickers. For example: Between X date and Y date, have been past X days, Y months and Z years. So, if I'd put in the first datetimepicker my birth date and in the second the day of today, I would…
user3108594
  • 225
  • 2
  • 5
  • 13
0
votes
1 answer

Avoiding for-loops in matrix operations with cell elements

The dimensions of this problem are: model.nlf = 4. Each {r} of Kuu or KuuGamma are 500x500 matrices of data. How to suppress the for-loop? my intuition goes toward using cellfun with a function for logdet. logDetKuu = 0; for r=1:model.nlf, if…
0
votes
1 answer

A lot of decimals in javascript operations

I'm running the following javascript code: var var1 = 0.53; var var2 = 0.47; alert(var1-var2); This code return: 0.06000000000000005 But if I execute this javascript code: var var1 = 0.14; var var2 = 100; alert(var1*var2); The return…
0
votes
1 answer

time_t (mhour) operations (+ / - ...)

thank's for read, this is easy question but ... i'am surprised. My code is : /* GET THE TIME */ time_t theTime = time(0); struct tm *aTime = localtime(&theTime); int mhour = aTime->tm_hour; ostringstream oss; string myString = " "; oss <<…
intoxx
  • 1
  • 1
0
votes
1 answer

Hybrid REST + stateless operations in an API

I'm implementing a RESTful API for what is essentially a document store, but am hitting a brick wall because I need a hybrid approach to one of the operations that can be performed on these documents. Essentially, a user should be able to generate…
Bharat
  • 463
  • 1
  • 8
  • 17
0
votes
2 answers

ASP.net file operations delay

Ok, so here's the problem: I'm reading the stream from a FileUpload control, reading in chunks of n bytes and writing the array in a loop until I reach the stream's end. Now the reason I do this is because I need to check several things while the…
mtranda
  • 191
  • 1
  • 2
  • 11
0
votes
4 answers

PHP Operations + Arrays

i need some help. I have an array ($array) - Array ( [0] => 1374410400 [1] => 1374394500 [2] => 1374384000 [3] => 1374304800 [4] => 1374291900 ). And the operation that will be used in array is defined by the user. The operation could be array_sum,…
0
votes
0 answers

Minimum steps to transform an array

I have an array of integers (both positive and negative). I need to make all the elements of the array zero, by doing the following operation repeatedly. Increasing one element by 1 and decreasing the others by 1 . I need to do this in minimum…
0
votes
4 answers

Scanner in Quiz issues

Hi I am having issues making a quiz program in java, here is what I have: (note: I have not set questions for Q3-10). The issue I am having is once the user enters the first question correctly, and the second question is displayed, if the user…
0
votes
1 answer

DOM and LINQ Difference

DOM and LINQ both are in-memory pattern. Apart from deferred execution,what is the difference between DOM and LINQ?
Dilson
  • 61
  • 8