operator-keyword Questions
7
Solved
I am following good programming practices and I am logging the PHP errors to file instead of displaying it to user. I use set_error_handler() for that.
Now the problem. For example, I have somewhe...
Apoplexy asked 11/9, 2011 at 19:46
3
Solved
I have a template class Array:
template <class T=int, int SIZE=10>
class Array {
T TheArray[SIZE];
public:
void Initialize() {
for (int idx=0; idx < SIZE; idx++) {
TheArray[idx] = T()...
Protrusile asked 4/1, 2016 at 14:22
6
Solved
I would like to know if operator precedence in programming languages depends on implementation or there is a fixed rule that all languages follow. And if possible, could you order the following ope...
Uhl asked 19/9, 2012 at 12:19
11
I want to use ternary operator without else in C. How do I do it.
(a)? b: nothing;
something like this. What do I use in nothing part?
Deaton asked 4/9, 2012 at 9:43
7
Solved
Say I have a string, $char. $char == "*".
I also have two variables, $a and $b, which equal "4" and "5" respectively.
How do I get the result of $a $char $b, ie 4 * 5 ?
Thanks :)
Ampereturn asked 25/4, 2011 at 16:26
3
Solved
Why is the "IN" operator so slow when used with subquery?
select *
from view1
where id in (1,2,3,4,5,6,7,8,9,10)
order by somedata;
executes in 9ms.
select *
from view1
where id in (select...
Christner asked 20/2, 2013 at 18:30
7
I have class CMatrix, where is "double pointer" to array of values.
class CMatrix {
public:
int rows, cols;
int **arr;
};
I simply need to access the values of matrix by typing:
CMatri...
Chengtu asked 2/4, 2013 at 11:25
8
Solved
Is there a way to do something similar to either of the following:
var1 = 10; var2 = 20;
var operator = "<";
console.log(var1 operator var2); // returns true
-- OR --
var1 = 10; var2 = 20;
v...
Gunfire asked 29/4, 2011 at 15:53
6
Solved
I read that Dart does not support function overloading. Does it support operator overloading? If yes, can you show me how it's done in a simple example? And what are some advantages etc?
Ontogeny asked 12/4, 2012 at 19:31
2
Solved
Here is an example:
val a: Int = 6
val b = a.toLong()
val c = a as Long
what is difference between .toLong() and as Long keyword? And what is better way to use
Nous asked 14/10, 2022 at 9:36
4
Solved
I have difficulties in understanding the sequence of calls in the code below.
I was expecting to see the output below
A1B2
While I can see that the output I get is
BA12
I thought that the c...
Flight asked 11/2, 2013 at 10:11
11
Solved
I have a domain class with unitPrice set as BigDecimal data type. Now I am trying to create a method to compare price but it seems like I can't have comparison operators in BigDecimal data type. Do...
Kareem asked 8/1, 2016 at 12:55
6
I am trying to get DockerOperator work with Airflow on my Mac. I am running Airflow based on Puckel with small modifications.
Dockerfile build as puckel-airflow-with-docker-inside:
FROM puckel/do...
Bosch asked 13/4, 2020 at 11:33
6
Solved
For what design reason is there no sizeof operator in Java? Knowing that it is very useful in C++ and C#, how can you get the size of a certain type if needed?
Violoncellist asked 1/12, 2011 at 18:21
5
I have a 2D array and I want to define a function that returns the value of the index that the user gives me using operator overloading.
In other words:
void MyMatrix::ReturnValue()
{
int row = 0,...
Supralapsarian asked 25/12, 2015 at 8:50
7
Solved
In some programming languages, I see (ex.):
x := y
What is this := operator generally called and what does it do?
Deputy asked 1/5, 2012 at 23:38
14
First off, the question is "Write a Java program to find the smallest of three numbers using ternary operators."
Here's my code:
class questionNine
{
public static void main(String args[])
{
i...
Hargrave asked 13/2, 2011 at 20:26
13
Solved
How can I write not greater-than-or-equal-to in PHP?
Is it >!= ?
Mutualism asked 8/7, 2010 at 15:18
6
Solved
I have the following code:
# initialize
a = []
# create the table (name, age, job)
a.append(["Nick", 30, "Doctor"])
a.append(["John", 8, "Student"])
a.appen...
Langmuir asked 3/9, 2013 at 15:8
6
Solved
I'm reading STL source code and I have no idea what && address operator is supposed to do. Here is a code example from stl_vector.h:
vector&
operator=(vector&& __x) // <-- N...
Lowercase asked 28/12, 2010 at 20:14
10
Solved
I have two boolean lists, e.g.,
x=[True,True,False,False]
y=[True,False,True,False]
I want to AND these lists together, with the expected output:
xy=[True,False,False,False]
I thought that ex...
Lamont asked 24/8, 2015 at 21:38
10
I notice that I can do things like 2 << 5 to get 64 and 1000 >> 2 to get 250.
Also I can use >> in print:
print >>obj, "Hello world"
What is happening here?
Microcrystalline asked 3/4, 2014 at 8:59
3
Solved
I have 2 classes which represent a matrix:
1. RegularMatrix - O(n^2) representation
2. SparseMatrix - a matrix that is represented as linked list (without zeros).
lets say i have:
RegularMatrix a...
Suggs asked 21/9, 2010 at 21:22
3
Solved
Clang and Visual Studio compilers (but not GCC) allow one to write the code as follows:
struct A
{
operator auto() { return 0; }
};
int main()
{
A a;
a.operator auto();
}
What is operator auto...
Scanty asked 6/7, 2021 at 7:57
5
Solved
I want to have a function that evaluates 2 bool vars (like a truth table).
For example:
Since
T | F : T
then
myfunc('t', 'f', ||); /*defined as: bool myfunc(char lv, char rv, ????)*/
should retur...
Paly asked 25/12, 2010 at 15:6
1 Next >
© 2022 - 2025 — McMap. All rights reserved.