Questions tagged [operations]

298 questions
3
votes
2 answers

Dot at the beginning of a "print" statement?

I've come across something odd while using a Perl script. It's about using a dot giving different results. perlop didn't turn anything up, or perhaps I just blew past it. I was looking at Operator Precedence and Associativity print "I'd expect to…
aschultz
  • 1,658
  • 3
  • 20
  • 30
3
votes
2 answers

ORA-12704: Unable to convert character data

I am trying to perform SET operations in Oracle across remote databases. I am using the MINUS operator. My query looks something like this. SELECT NAME FROM localdb MINUS SELECT NAME from remotedb@dblink This is throwing up a ORA-12704 error. I…
abhi
  • 3,082
  • 6
  • 47
  • 73
3
votes
1 answer

Android : Network operations in Appwidget

I'm developing a Android AppWidget for my application. For updating my appwidget I need to download data from network. But when I try to do that in onUpdate method, my appWidget is killed by Android system. I learnt that time consuming operations…
Amit Chintawar
  • 20,450
  • 1
  • 17
  • 17
3
votes
1 answer

Perl speed: difference between $a = $a.$b and $a .= $b

I've put all the code and running info below. When handling very long strings, the speed of operations in the title is different. Why and How many other operations show the same characteristics? (If the loops is lower than 10^4, the different is…
Roden Luo
  • 366
  • 2
  • 11
3
votes
2 answers

Bitwise and (&) operator

I read that doing a & 0x7fffffff masks just the sign bit and doesn't tampers with the other bits. int a = Integer.MIN_VALUE; System.out.println(a & 0x7fffffff); But, this code outputs 0 instead of 2147483648 Why is that?
3
votes
1 answer

Java: Bitwise operation for flag checking

I'm trying to check whether or not a number has the second bit flag (ie 0000 0010). My code is as follows: int flags = Integer.parseInt(fields[1]); String strflags = Integer.toBinaryString(flags); flags = Integer.parseInt(strflags); int…
Lindsay L
  • 33
  • 1
  • 3
3
votes
3 answers

Polynomial operations using operator overloading

I'm trying to use operator overloading to define the basic operations (+,-,*,/) for my polynomial class but when i run the program it crashes and my computer frozes. Update4 Ok. i successfully made three of the operations, the only one left is…
Vlad
  • 618
  • 2
  • 10
  • 21
3
votes
1 answer

How operations are performed for dynamic array?

I have studied everywhere in books about Dymanic arrays. I have used them in STL of C++. But I am still unclear about what are Dynamic arrays. How the operations over Dynamic arrays are implemented.
user2466482
3
votes
1 answer

Datastore Read Operations Calculation

So I am currently performing a test, to estimate how much can my Google app engine work, without going over quotas. This is my test: I have in the datastore an entity, that according to my local dashboard, needs 18 write operations. I have 5…
Teshte
  • 624
  • 1
  • 7
  • 26
3
votes
2 answers

Cast some light on population count algorithm

I looked for good methods to do popcount (count of set bits). I found this one, here http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan unsigned int v; // count the number of bits set in v unsigned int c; // c accumulates the…
kiriloff
  • 25,609
  • 37
  • 148
  • 229
3
votes
1 answer

Bitwise Operations in a Steganography Program (C)

I'm relatively new to both C and bitwise operations and I'm having trouble with an assignment I've been given in my class. A majority of the code has been given to me, but I've been having issues figuring out a part pertaining to bitwise operations.…
JamesClem
  • 33
  • 6
2
votes
3 answers

Keep the biggest values from source AND destination (bitwise OR) in OpenGL ES 2.0

let me explain the title a little. In the framebuffer I have some color values (for simplicity I am going to refer only to one color channel in binary e.g. 00000001 in a specific pixel). Then in that specific value I am going to write a new value.…
Summon
  • 968
  • 1
  • 8
  • 19
2
votes
4 answers

Can you operate on Arrays in Java like in Matlab?

I was wondering whether there was a way to do the following, without writing a function or a for loop: int[] ma = (3,4,4,5,6,7); ma += 5; thus, adding 5 to all elements in the array. Matlab allows for such a convenient shortcut.
noisebelt
  • 940
  • 2
  • 9
  • 20
2
votes
2 answers

Generating huge lists of numbers

I'm trying to generate a huge list of sequenced numbers with 0 padding for example: 00000000 00000001 00000002 . . 99999997 99999998 99999999 im trying something like: for i in $(seq 00000000 99999999);do echo ${i} >>…
Almus
  • 23
  • 3
2
votes
1 answer

RESTful operations, server-side operations

Ok, I've got a Payment system. Let's ignore everything around it, and focus on the Payment itself. Through a bunch of wizards, I build up a particular payment. First, I do a POST /payment server returns LOCATION /payment/{id} first Wizard…
Jeff Wang
  • 1,837
  • 1
  • 15
  • 29