I've been looking around for this for a couple days but haven't found exactly what I need so here we go:
Cell C2 is a date, cell G2 is a dollar amount.
If/When C2 is one-year-old I need G2 to turn red.
Ex.)
C2 = 6/1/2018, G2 = $250 in red
or
C3 = 2/1/2021, G3 = $250 in black (but will turn red on 2/2/2022)
thoughts?
Try this:
Create Conditional Formatting for G2 (New Rule -> Use a formula to determine which cells to format) and use this formula:
=DATEDIF(C2,TODAY(),"Y")>0
Rest of the formatting like color border etc. set as you like.
Edit:
I realised that this will put G2 in red on the same day next year. For example:
C3 = 2/1/2021, G3 = $250 in black (but will turn red on 2/1/2022)
If you need it next day just modify formula to this:
=DATEDIF(C2,TODAY()-1,"Y")>0
I am learning the networkx function named "networkx.graph_edit_distance(g2,q)". Actually, GED(g2,q) = 2.If we want to tranform g2 to q, we should do at least 2 graph edit operations"substituing (1,3) whose label is '2' in g2 to (1,3) whose label is '1', inserting (3,4) which is not exsits in g2 to (3,4) whose label
is '1".My code is shown below:
nodes = [(1,{'label':'C1'}),
(2,{'label':'C2'}),
(3,{'label':'C3'}),
(4,{'label':'C4'}),
(5,{'label':'N'})]
edges = [(1,2,{'label':'1'}),
(2,4,{'label':'1'}),
(4,5,{'label':'1'}),
(5,3,{'label':'1'}),
(3,1,{'label':'2'})]
g2 = nx.Graph()
g2.add_nodes_from(nodes)
g2.add_edges_from(edges)
nodes = [(1,{'label':'C1'}),
(2,{'label':'C2'}),
(3,{'label':'C3'}),
(4,{'label':'C4'}),
(5,{'label':'N'})]
edges = [(1,2,{'label':'1'}),
(2,4,{'label':'1'}),
(4,5,{'label':'1'}),
(5,3,{'label':'1'}),
(3,1,{'label':'1'}),
(3,4,{'label':'1'})]
q = nx.Graph()
q.add_nodes_from(nodes)
q.add_edges_from(edges)
GED_q_g2 = nx.graph_edit_distance(g2, q)
But unfortunately, the expected answer is GED =2, but it gives the answer GED_q_g2 = 1.Please how could I get the right answer?
When I look at the defined graph, the edit distance of 1 is correct, because only (3,4) needs to be removed.
The graph that you've drawn displays two edges between 1 and 3, though. I guess you've misunderstood the label functionality: It's just an optional data attribute that you can use for identification or plotting - it has nothing to do with the number of edges or weights.
If you want to use multiple edges between two nodes, have a look at nx.Multigraph.
just use the edge_match.
nx.graph_edit_distance(g1,g2,edge_match=lambda a,b: a['label'] == b['label']))
Here is one of problems in my assignment:
Consider the RSA public key (e,N) =
(9292162750094637473537,13029506445953503759481). Find the corresponding private exponent d ∈ Z∗N . Show how you did this.
I feel like it is an impossible task. I know
ed ≡ 1 mod ϕ(N)
where
ϕ(N) = (p-1)(q-1)
but I don't know p and q.
My question is that is there a way to find d if only e and N are given without knowing p and q?
OR
Is there a way to calculate p and q from N = pq? (Although I feel like it will be very difficult)
I am trying to do succesive mean quantization transform. And ı stuck the condition while making D0 and D1.ı dont know what ı should put in if the condition is false . (making 0 is not the solution because its changes the new matrix of mean).
Let x be a data point and D(x) be a set of |D(x)| = D data
points. The value of a data point will be denoted V(x).
D0(x) = {x | V(x) ≤ mean(V(x)), ∀x ∈ D}
D1(x) = {x | V(x) > mean(V(x)), ∀x ∈ D}
where D0(x) propagates left and D1(x) right in the binary
tree.
Article about SMQT
Is there anyone who studied smqt before or any idea to solve this problem.
thanks.
D0 and D1 are arrays
D0=V(V<=mean(V(:)));
D1=V(V>mean(V(:)));
I have two figures of table.
One table is call H and another one call C. Both table is 4 by 3 table.
So if the user insert a value in two edit box. For example:
A = *value*
B = *value*
Then the user insert the data in H table. The user only use 2 rows. Let say this is the data:
ALPHA BETA GAMMA
H1
H2
H3
H4
So the user want to get the subset of H1 and multiply with A and subsets of H2 multiply with B. This is how it will be:
C1 = (ALPHA VALUE)*A (BETA VALUE)*A (GAMMA VALUE)*A
C2 = (ALPHA VALUE)*B (BETA VALUE)*B (GAMMA VALUE)*B
Then the user wants to display the answer on C table where it will become like this:
ALPHA BETA GAMMA
C1 NEW VALUE NEW VALUE NEW VALUE
C2 NEW VALUE NEW VALUE NEW VALUE
C3
C4
How can i make the coding of this problem?
I have already try this coding but it seems i failed. CAN ANYONE HELP ME PLEASE!!
H = cell2mat(get(handles.Mytable3,'Data'));
cost1 = str2num(get(handles.input2_editText,'String'));
cost2 = str2num(get(handles.input3_editText,'String'));
H1 = H(1,:)*cost1;
H2 = H(2,:)*cost2;
H = mat2cell([H1 H2]);
cost = get(H,'Data');
set(handles.Mytable2,'Data',cost)
Try:
H = num2cell([H1 H2]);
set(handles.Mytable2,'Data',H)