Questions tagged [notation]

Notation refers to a specific way of writing various concepts, functions, etc. Usually it is introduced to abbreviate complicated expressions and make common idioms more readable.

633 questions
4
votes
2 answers

(log n)^k = O(n)? For k greater or equal to 1

(log n)^k = O(n)? For k greater or equal to 1. My professor presented us with this statement in class, however I am not sure what it means for a function to a have a time complexity of O(n). Even stuff like n^2 = O(n^2), how can a function f(x) have…
user1084113
  • 932
  • 3
  • 15
  • 31
4
votes
3 answers

Haskell >.> notation

In the book "The Craft of Function Programming" the symbol '>.>' joins functions together, opposite the direction of '.'. But when I implemented it using ghci, it shows the error '>.>' out of scope. Why? Is it an old notation that is not used…
HHC
  • 2,513
  • 2
  • 18
  • 26
4
votes
4 answers

Meaning of *= in Java

I see an unfamiliar notation in the Android source code: *= For example: density *= invertedRatio; I am not familiar with the star-equals notation. Can somebody explain it?
IgorGanapolsky
  • 26,189
  • 23
  • 116
  • 147
4
votes
3 answers

Shorter notation for getting an object field

I'm wondering if there's a short notation in PHP for getting an object field when creating an object. For example, in Java, I don't have to put a newly created object in a variable in order to get one of it's fields. Example: public class NewClass…
MeLight
  • 5,454
  • 4
  • 43
  • 67
4
votes
1 answer

What is the difference between the docker port mapping notations: 5432/tcp vs 0.0.0.0:5432->5432/tcp?

When I call the command docker ps all my running docker containers are listed. Among other things, the port mappings are displayed in the PORTS column. I can't figure out what the difference is between this notation: 5432/tcp and that notation:…
zingi
  • 1,141
  • 13
  • 23
4
votes
2 answers

when can I use dot notation to access a dictionary in Python

I am modifying somebody's code in the context of the 'gym'' environment and came across the use of the dot notation to access a dictionary. the following snippet shows that the dictionary in gym can use the notation but when I duplicate it it…
Alan Johnstone
  • 455
  • 1
  • 7
  • 24
4
votes
4 answers

About Trees and Prefix (Polish) Notation?

My MIPS Assembly class required me to read in an expression of unknown size into a Parse Tree. I've never had to deal with trees, so this is how I went around storing values: Lets say the user entered the expression 1 + 3 - 4 (each operand could…
101010110101
  • 1,940
  • 8
  • 31
  • 42
4
votes
4 answers

How should complex numbers be rendered?

Mathematics naive question: What is the "canonical" way to represent 14+1i? 14+i1 or 14+i Similarly, is it likely, in the 'real world', that scientific notation is going to creep into a complex number so as to freak out a complex numbers parser?…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
4
votes
1 answer

Do not import notations in coq

I have two external modules(the sources of which are better not to be alternated) which define the same notation. The consequence of this is I am now not able to import both module at the same time anymore, due to this error: Error: Notation _ ~ _…
Jason Hu
  • 6,239
  • 1
  • 20
  • 41
4
votes
2 answers

Using Implicit Type Class Parameters in Coq Notation

I'm trying to wrap my head around type classes in Coq (I've dabbled with it in the past, but I'm a far cry from being an experienced user). As an exercise, I am trying to write a group theory library. This is what I've come up with: Class Group {S :…
belph
  • 362
  • 2
  • 10
4
votes
4 answers

Should Javascript still be "hidden" in HTML comment tags?

I have recently inherited some web code and found that all the Java Script scripts are contained within HTML comment tags For example: