Top "Operation" questions

How to multiply float with integers in C?

When I execute this code it returns me 1610612736 void main(){ float a=3.3f; int b=2; printf("%d",a*b); } Why …

c integer operation
Multiply vector elements by a scalar value using STL

Hi I want to (multiply,add,etc) vector by scalar value for example myv1 * 3 , I know I can do a …

c++ stl vector element operation
Converting KB to MB, GB, TB dynamically

public String size(int size){ String hrSize = ""; int k = size; double m = size/1024; double g = size/1048576; double t = size/1073741824; DecimalFormat …

java int double division operation
byte operations (XOR) in python

#!/usr/bin/env python3 import binascii var=binascii.a2b_qp("hello") key=binascii.a2b_qp("supersecretkey")[:len(var)] …

python encryption byte type-conversion operation
How to select odd or even items from a row in SQL?

I need only even or odd items, so I find modulus operation and this doesn't works SELECT * FROM table ORDER …

sql modulus operation
Illegal operation attempted on a registry key that has been marked for deletion - only in IE

I have a web application that throws the following error when running in IE: Illegal operation attempted on a registry …

internet-explorer iis key registry operation
postgreSQL - in vs any

I have tried both 1) smthng = any(select id from exmplTable) 2) smthng in (select id from exmplTable) and I am getting …

postgresql operation any sql-in
Cassandra CQLSH OperationTimedOut error=Client request timeout. See Session.execute[_async](timeout)

I want to transfer data from one Cassandra cluster (reached via 192.168.0.200) to another Cassandra cluster (reached via 127.0.0.1). The data is 523 …

cassandra timeout cqlsh operation
Is addition of byte converts to int because of java language rules or because of jvm?

byte a = 1; byte b = 1; byte c = a + b; Throws error: possible loss of precision byte subt = a_s - a_…

java type-conversion byte operation type-promotion
Python: One-liner to perform an operation upon elements in a 2d array (list of lists)?

I have a list of lists, each containing a different number of strings. I'd like to (efficiently) convert these all …

python arrays matrix 2d operation