631 questions
1
vote
1
answer
58
views
Write mutliple mathematical symbols via bquote in R
I am having trouble placing more than one mathematical symbol via bquote in the scale_color_manual call of ggplot. As an example, I am trying to create a legend that has pvalues labeled and described ...
0
votes
1
answer
52
views
Why doesn't Coq notation defined by other notation working well?
Here is my Coq code.
I expected Check x ∪ y. shows x ∪ y but ∪ {x, y}.
Why? Or is there another idea to define notation?
My Coq version is 8.16.1.
Section Test.
Variable set:Type.
Variable In : ...
0
votes
1
answer
48
views
Turning infix notation to prefix notation has problems in formatting (Python)
I'm trying to create a program that turns infix notation to prefix notation, regardless of what kind of number the user inputs(it could be a variable like A B or an integer like 3 34 23):
def isDigit(...
0
votes
1
answer
347
views
How to write a number in scientific notation in Python keeping the mantissa as integer
Suppose I have x=3.141516 and y=0.00129. I need to format those numbers in scientific notation but the mantissa must not have decimal places. For example:
x = 3141516e-6
y = 129e-5
I have no idea how ...
1
vote
1
answer
305
views
React dot notation component passing between components
How to pass Parent props boolean in to child component when using dot notation with functional component.
Component structure is
<Dropdown className="float-right">
<Dropdown.Title&...
0
votes
0
answers
41
views
How do I convert values that are given in scientific notation into decimals?
How do I convert values that are given in scientific notation into decimals? This would be values in certain columns in a dataframe in a jupyter notebook.
I tried using the float function and the ...
0
votes
1
answer
67
views
How can I return an object that supports dict and dot-notation from SQLite queries in Python?
I have the following code for a sqlite3 query. I want to be able to use index, dict, and dot-notation to access row attributes. Using the sqlite3.Row row_factory allows index and dict access, but not ...
1
vote
0
answers
35
views
Representing logical operations in math/logical notation
I want to use notation like this for loop (which was used in an answer to this question) for some code I have written to calculate the "solar time" of a timestamp given it's location and ...
2
votes
0
answers
779
views
Formatting numerical tick labels into exponential notation in ggplot2, without rescaling x- or y-axis
I am not very proficient in R, and I have stumbled upon an obstacle when using ggplot2. I have a plot with large numbers on both the x and y axis of the plot. Since I am dealing with large numbers, ...
0
votes
2
answers
1k
views
How to return scientific notation with only a few decimal places with the notation still intact? [duplicate]
How to return scientific notation to decimal places with scientific notation still in python?
So I have a value like: 1.197474567059189e-09
How do I return something like 1.1974e-09 instead?
Thanks!
...
0
votes
2
answers
30
views
why scientific notation leaves an extra character "1" after e in R?
An extra character of "1" is printing on the figure. Why so and how to remove this?
MWE:
data <- ChickWeight
par(mar = c(4,4,0.5,0.5) + 0.1, mgp = c(2.75,1,0), las = 1, cex = 1.2)
data....
-1
votes
1
answer
167
views
Normal to RPN conversion
I have a question.
Is (3+4)*(5+6+7*8)*(1*9+2*8) equal to 34 + 56 + 78 + * + 19 * 28 * + * in RPN notation?
-1
votes
1
answer
53
views
Normalizing a board game notation
I have a board game notation for the game of Hnefatafl which I need to rotate clockwise. In the game of Hnefatafl we use a 11x11 board with files from A to K and ranks numbered from 1 to 11.
So, here ...
0
votes
1
answer
56
views
What would be the time complexity of this code? Big O notation
`
def func5(n, m):
i = 0
while i < n:
j = 1
while j < m:
print(i+j)
j *= 3
i += 1
`
I have gotten answers O(n*m) and O(n(log(m)). Which ...
-2
votes
1
answer
38
views
What does this for loop syntax mean? [duplicate]
I recently came to this thread, and had a quick question on the syntax used in the first answer. @ggorlen used this syntax/notation in the for loop that I've never seen before and couldn't find any ...