Rainmeter Meter not hiding - rainmeter

I am making a rainmeter skin based of the "Elegant Clock" skin, and am trying to make it so that some of the meters will hide if it is before or after a certain time of day. For now, all I want it to do is change what it says in the text. So far (looking at MeasureCalc3 and MeterTime10011) I have this:
;Elegant
;Clock Skin - Black
;Created by TwistLemon
[Rainmeter]
Author=TwistLemon
Update=100
[Metadata]
Name=
Author=
Information=
License=
Version=
[Variables]
Size1=74
Size2=18
ClockSize=150
WhiteHands=255,255,255,255
BlackHands=0,0,0,250
;Start time (24-hour clock)
Hour=7
Minute=30
Second=0
;Total number of hours/minutes/seconds
HoursTotal=7
MinutesTotal=20
SecondsTotal=0
;Start time2 (24-hour clock)
Hour2=7
Minute2=30
Second2=0
;Total number of hours/minutes/seconds2
HoursTotal2=2
MinutesTotal2=15
SecondsTotal2=0
;Start time3 (24-hour clock)
Hour3=9
Minute3=45
Second3=0
;Total number of hours/minutes/seconds3
HoursTotal3=1
MinutesTotal3=55
SecondsTotal3=0
;Start time4 (24-hour clock)
Hour4=11
Minute4=40
Second4=0
;Total number of hours/minutes/seconds4
HoursTotal4=3
MinutesTotal4=10
SecondsTotal4=0
;-----------MEASURES------------
[MeasureTime0]
Measure=Time
Format=%H
[MeasureTime1X]
Measure=Time
Format=%I
Substitute="01":"185r","02":"185r","03":"185r","04":"185r","05":"185r","06":"185r","07":"185r","08":"185r","09":"185r","10":"215r","11":"21
5r","12":"215r"
[MeasureTime1]
Measure=Time
Format=%I
Substitute="01":"1:","02":"2:","03":"3:","04":"4:","05":"5:","06":"6:","07":"7:","08":"8:","09":"9:","10":"10:","11":"11:","12":"12:"
[MeasureTime2]
Measure=Time
Format=%M %p
[MeasureTime3]
Measure=Time
Format=%M
[MeasureDate]
Measure=Time
Format=%A, %d %B %Y
[MeasureDate2]
Measure=Time
Format=%d
Substitute="01":"1","02":"2","03":"3","04":"4","05":"5","06":"6","07":"7","08":"8","09":"9"
[MeasureDate3]
Measure=Time
Format=%m
[MeasureDate4]
Measure=Time
Format=%Y
[MeasureFull]
Measure=calc
Formula=1
[MeasureSeconds]
Measure=TIME
Format=%S
Substitute="00":"0","01":"1","02":"2","03":"3","04":"4","05":"5","06":"6","07":"7","08":"8","09":"9"
[MeasureSeconds2]
Measure=TIME
Format=%S
[MeasureCalc]
Measure=calc
Formula=(MeasureSeconds2/60)
[MeasureFull]
Measure=calc
Formula=1
[MeasureCalc2]
Measure=calc
Formula=((((#HoursTotal#*3600)+#MinutesTotal#*60)+#SecondsTotal#)-(((((((MeasureTime0-#Hour#)*60)+MeasureTime3)-
#Minute#)*60)+(MeasureSeconds-#Second#))/((((#HoursTotal#*3600)+#MinutesTotal#*60)+#SecondsTotal#))*
(((#HoursTotal#*3600)+#MinutesTotal#*60)+#SecondsTotal#)))
[MeasureCalc3]
Measure=calc
Formula=((((#HoursTotal2#*3600)+#MinutesTotal2#*60)+#SecondsTotal2#)-(((((((MeasureTime0-#Hour2#)*60)+MeasureTime3)-
#Minute2#)*60)+(MeasureSeconds-#Second2#))/((((#HoursTotal2#*3600)+#MinutesTotal2#*60)+#SecondsTotal2#))*
(((#HoursTotal2#*3600)+#MinutesTotal2#*60)+#SecondsTotal2#)))
IfConditionMode=1
IfCondition=((((((#HoursTotal#*3600)+#MinutesTotal#*60)+#SecondsTotal#)-(((((((MeasureTime0-#Hour#)*60)+MeasureTime3)-
#Minute#)*60)+(MeasureSeconds-#Second#))/((((#HoursTotal#*3600)+#MinutesTotal#*60)+#SecondsTotal#))*
(((#HoursTotal#*3600)+#MinutesTotal#*60)+#SecondsTotal#))))>(18300))
IfTrueAction=!SetOption MeasureCalc3 Formula hi
IfFalseAction=!SetOption MeasureCalc3 Formula no
[MeasureCalc4]
Measure=calc
Formula=((((#HoursTotal3#*3600)+#MinutesTotal3#*60)+#SecondsTotal3#)-(((((((MeasureTime0-#Hour3#)*60)+MeasureTime3)-
#Minute3#)*60)+(MeasureSeconds-#Second3#))/((((#HoursTotal3#*3600)+#MinutesTotal3#*60)+#SecondsTotal3#))*
(((#HoursTotal3#*3600)+#MinutesTotal3#*60)+#SecondsTotal3#)))
[MeasureCalc5]
Measure=calc
Formula=((((#HoursTotal4#*3600)+#MinutesTotal4#*60)+#SecondsTotal4#)-(((((((MeasureTime0-#Hour4#)*60)+MeasureTime3)-
#Minute4#)*60)+(MeasureSeconds-#Second4#))/((((#HoursTotal4#*3600)+#MinutesTotal4#*60)+#SecondsTotal4#))*
(((#HoursTotal4#*3600)+#MinutesTotal4#*60)+#SecondsTotal4#)))
;-----------METERS------------
[MeterTime1
MeasureName=MeasureSeconds
Meter=STRING
X=56
Y=1
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime111]
MeasureName=MeasureSeconds
Meter=STRING
X=52
Y=-4
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime15]
MeasureName=MeasureSeconds
Meter=STRING
X=54
Y=0
FontColor=2BB4D6
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime2215]
MeasureName=MeasureSeconds
Meter=STRING
X=54
Y=0
FontColor=2BB4D6
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime115]
MeasureName=MeasureSeconds
Meter=STRING
X=53
Y=-2
FontColor=FFFFFFF
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterBar42]
Meter=BAR
MeasureName=MeasureCalc
Flip=1
BarOrientation=Horizontal
X=5
Y=118
H=5
W=57
BarColor=000000
[MeterBar32]
Meter=BAR
MeasureName=MeasureCalc
Flip=1
BarOrientation=Horizontal
X=4
Y=117
H=5
W=57
BarColor=2BB4D6
[MeterBar22]
Meter=BAR
MeasureName=MeasureCalc
Flip=1
BarOrientation=Horizontal
X=2
Y=113
H=5
W=57
BarColor=000000
[MeterBar12]
Meter=BAR
MeasureName=MeasureCalc
Flip=1
BarOrientation=Horizontal
X=3
Y=115
H=5
W=57
BarColor=FFFFFF
[MeterBar4]
Meter=BAR
MeasureName=MeasureCalc
BarOrientation=Horizontal
X=58
Y=118
H=5
W=58
BarColor=000000
[MeterBar3]
Meter=BAR
MeasureName=MeasureCalc
BarOrientation=Horizontal
X=57
Y=117
H=5
W=58
BarColor=2BB4D6
[MeterBar2]
Meter=BAR
MeasureName=MeasureCalc
BarOrientation=Horizontal
X=56
Y=113
H=5
W=58
BarColor=000000
[MeterBar1]
Meter=BAR
MeasureName=MeasureCalc
BarOrientation=Horizontal
X=56
Y=115
H=5
W=58
BarColor=FFFFFF
[MeterBarTotal]
Meter=BAR
MeasureName=MeasureFull
X=-20
Y=0
H=115
W=99999
BarColor=185,250,160,2
SolidColor=150,150,150,2
[MeterTime100]
MeasureName=MeasureCalc2
Meter=STRING
X=506
Y=1
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime11100]
MeasureName=MeasureCalc2
Meter=STRING
X=502
Y=-4
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime1500]
MeasureName=MeasureCalc2
Meter=STRING
X=504
Y=0
FontColor=2BB4D6
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime11500]
MeasureName=MeasureCalc2
Meter=STRING
X=503
Y=-2
FontColor=FFFFFFF
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime10011]
MeasureName=MeasureCalc3
Text=""
Meter=STRING
X=906
Y=1
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime1110011]
MeasureName=MeasureCalc3
Meter=STRING
X=902
Y=-4
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime150011]
MeasureName=MeasureCalc3
Meter=STRING
X=904
Y=0
FontColor=2BB4D6
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime1150011]
MeasureName=MeasureCalc3
Meter=STRING
X=903
Y=-2
FontColor=FFFFFFF
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime1001122]
MeasureName=MeasureCalc4
Meter=STRING
X=906
Y=1
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime111001122]
MeasureName=MeasureCalc4
Meter=STRING
X=902
Y=-4
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime15001122]
MeasureName=MeasureCalc4
Meter=STRING
X=904
Y=0
FontColor=2BB4D6
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime115001122]
MeasureName=MeasureCalc4
Meter=STRING
X=903
Y=-2
FontColor=FFFFFFF
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime100112233]
MeasureName=MeasureCalc5
Meter=STRING
X=906
Y=1
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime11100112233]
MeasureName=MeasureCalc5
Meter=STRING
X=902
Y=-4
FontColor=000000
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime1500112233]
MeasureName=MeasureCalc5
Meter=STRING
X=904
Y=0
FontColor=2BB4D6
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
[MeterTime11500112233]
MeasureName=MeasureCalc5
Meter=STRING
X=903
Y=-2
FontColor=FFFFFFF
FontSize=74
FontFace=Antipasto
StringAlign=CENTER
;StringStyle=BOLD
AntiAlias=1
What exactly am I doing wrong with the IfCondition statment to where the meter shows the value of the expression rather than the forced "hi" or "no"?

If you know how to use the !SetOption bang, why don't you directly use it in your measureCalc3 to set the text of your MeterTime10011?
So do
IfTrueAction=!SetOption MeterTime10011 Text hi
IfFalseAction=!SetOption MeterTime10011 Text no

Related

How to solve this equation in mathematica?

$$ \partial_{t}{v}+\frac{( v \cdot \nabla) \cdot v }{ A}=-\frac{\nabla{p_{1}}}{ \rho_{0} A}-\frac{e\rho(v \times B)}{\rho A}--e(v \cdot \Omega)(B\cdot \nabla)v+(\frac{\nabla{p_{1}}}{\rho_{0}} \times \Omega) \cdot \nabla{v}-\frac{eE}{A}+-e^{2}(E \cdot B)\Omega-(E \times \Omega) \cdot \nabla{v} $$
I have to find $p_{1}$ from this equation above where $v=-\nabla{\phi}$.How to do it in Mathematica? Here dot means diff w.r.t 't'
I tried to find out $p_{1}$ writing in Mathematica .It's showing errors

How to define a brotherhood relationship and write a query that gives every uncle of a person X in the knowledge base An uncle X

If u have these facts:
parent(albert, bob).
parent(albert, betsy).
parent(albert, bill).
parent(alice, bob).
parent(alice, betsy).
parent(alice, bill).
parent(bob, carl).
parent(bob, charlie).
teacher(albert).
teacher(alice).
How to define a brotherhood relationship and write a query that gives every uncle of a person X in the knowledge base. An uncle
is defined as brother of one’s parent.

Cycling through multiple lists in shell for loop

There is a way to do this in python using itertools.product, but, is there a way to do this in shell?
L1 = 'a b c'
L2 = '1 2'
L3 = 'x y'
for x, y, z in L1, L2, L3:
do
echo x,y,z
done
I would like the results to look like:
a1x
a1y
a2x
a2y
b1x
b1y
...
If you know what the lists are, you can use brace expansion:
$ printf '%s\n' {a,b,c}{1,2}{x,y}
a1x
a1y
a2x
a2y
b1x
b1y
b2x
b2y
c1x
c1y
c2x
c2y
If, however, the lists are in, say, three arrays, you have to do nested loops:
l1=(a b c); l2=(1 2); l3=(x y)
for i in "${l1[#]}"; do
for j in "${l2[#]}"; do
for k in "${l3[#]}"; do
echo "$i$j$k"
done
done
done

make multiple assert basing on pattern matching

Given a parse tree of a string my goal is to update my knowledge base.
From a sentence with variable length like the following:
"node 1 is near node 2 that is near node 3 that is near node 4 that..."
in my representation becomes a parse tree representation of the sentence, for example:
s(desc(np(noun(node),id(1)),vp(verb(is),prep(near),np(noun(node),id(2),rel_clause(rel(that)...
from which I'd like to extract and assert the following informations:
edge(1,2),edge(2,3),edge(3,4).
How can I achieve this goal?
I've tried to manage some case with something like
:- dynamic edge/2.
extract(T):- T= s(desc(np(noun(node),id(A)),vp(verb(is),prep(near),np(noun(node),id(B)))),
assert(edge(A,B)).
extract(T):- T= s(desc(np(noun(node),id(A)),vp(verb(is),prep(near),np(noun(node),id(B),rel_clause(rel(that)...
etc
but I'd like to manage potential infinite sentences.
I'm using SWI-prolog.
EDIT:
complete example of a parse tree I get in input:
desc(np(noun(node), id(1)), vp(verb(is), prep(near), np(noun(node), id(2),
rel_clause(rel(that), vp(verb(is), prep(near), np(noun(node), id(3),
rel_clause(rel(that), vp(verb(is), prep(near), np(noun(node), id(4)))))))))
The first thing to do is come up with a more useable description of your data. One way is to break it down like this:
description = desc(subject, verb_part)
subject = np(noun(node), id(A))
verb_part = vp(verb(is), prep(near), object_part)
object_part = np(noun(node), id(B))
object_part = np(noun(node), id(B), rel_part)
rel_part = relcl(rel(that), verb_part)
From here, you can see where the recursion occurs and write predicates which align with the definitions above:
% description = desc(subject, verb_part)
% subject = np(noun(node), id(A))
%
extract(desc(np(noun(node), id(A)), VerbPart)) :-
select_edge(A, VerbPart).
% verb_part = vp(verb(is), prep(near), object_part)
%
select_edge(A, vp(verb(is), prep(near), ObjectPart)) :-
connect_node(A, ObjectPart).
% object_part = np(noun(node), id(B))
%
connect_node(A, np(noun(node), id(B))) :-
assertz(edge(A, B)).
% object_part = np(noun(node), id(B), rel_part)
% rel_part = relcl(rel(that), verb_part)
%
connect_node(A, np(noun(node), id(B), relcl(rel(that), VerbPart))) :-
assertz(edge(A, B)),
select_edge(B, VerbPart).
To execute:
| ?- extract(desc(np(noun(node), id(1)), vp(verb(is), prep(near), np(noun(node), id(2),
relcl(rel(that), vp(verb(is), prep(near), np(noun(node), id(3),
relcl(rel(that), vp(verb(is), prep(near), np(noun(node), id(4))))))))))).
true ? ;
no
The results are asserted, as can be seen if we list the edge/2 facts:
| ?- listing(edge).
% file: user_input
edge(1, 2).
edge(2, 3).
edge(3, 4).
yes
You can also collect the edges in a list instead of asserting them, and have a result of the query be, [edge(1,2), edge(2,3), edge(3,4)]:
extract(desc(np(noun(node), id(A)), VerbPart), Edges) :-
select_edge(A, VerbPart, Edges).
select_edge(A, vp(verb(is), prep(near), ObjectPart), Edges) :-
connect_node(A, ObjectPart, Edges).
connect_node(A, np(noun(node), id(B)), [edge(A,B)]).
connect_node(A, np(noun(node), id(B), relcl(rel(that), VerbPart)), [edge(A,B)|Edges]) :-
select_edge(B, VerbPart, Edges).
And then assert them all at once from the resulting list with maplist:
extract(Description, Edges), maplist(assertz, Edges).

Somebody could help me with this little program in prolog?

When I run my program with this sentence:
| ?- constraints(C).
and the result is:
C = [espacio(chuck,brenda,lewis,cafe,treintayuno),
espacio(bill,mary,tread,rojo,veinteynueve),
espacio(steve,cindy,branch,negra,cuarentaytres),
espacio(tom,laura,forrest,azul,treintaycinco)|_A] ?
The result is fine but at the end is there an "|A" and I don't know what is wrong???
It is my code:
/*
Cuatro parejas deciden ir a acampar a la selva del estado un fin de semana.
Cada pareja viajo en una van diferente y cada una eligio un espacio de
campo separado. Todos los sitios para acampar estan etiquetados con un
numero y mientras estan en la misma area los sitios no se juntan entre si.
Determina el nombre completo de cada pareja, color de van y numero de su
espacio de campo.
TRADUCCION
1.- BIll quie no esta casado con Laura, no manejo una Van Negra
2.- Chuck y su esposa Brenda no acamparon en el espacio #35. El apellido de
Breanda no es Forrest
3.- La pareja Lewis quien manejo una van Cafe, acamparon en el espacio 31
4.- Tom acampo en un espacio mas bajo del que acampo Cindy pero mas alto
que la pareja que manejo una Van Roja.
5.- Tom no esta casado con Mary Tread. Steve Branch no maneja una van azul.
6.- La pareja que maneja la van negra acampo en el espacio #43
ORIGINAL
1. Bill, who is not married to Laura, didn't drive a black van.
2. Chuck and his wife Brenda were not camped in space #35. Brenda's last
name is not
Forrest.
3. The Lewis couple, who drove a tan van, camped in space #31.
4. Tom camped in a space numbered lower than the one Cindy camped in but
higher than the
couple who drove in the red van did.
5. Tom isn't married to Mary Tread. Steve Branch didn't drive a blue van.
6. The couple driving the black van camped in space #43.
*/
use_module( library(basics)).
use_module(library(lists)).
% UN CAMPAMENTO ES UNA LISTA DE 5 ESPACIOS; CADA ESPACIO TIENE UNA PAREJA
(HOMBRE Y MUJER Y APELLIDO) UNA VAN Y UN NUMERO DE ESPACIO.
campamento([espacio(_,_,_,_,_),
espacio(_,_,_,_,_),
espacio(_,_,_,_,_),
espacio(_,_,_,_,_)]).
% De acuerdo a las sentencias previas podemos establecer lo siguiente:
constraints( Campamento ):-
member(espacio(chuck,brenda,_,_,_), Campamento), % 2)
member(espacio(_,_,lewis,cafe,treintayuno), Campamento), % 3)
member(espacio(_,mary,tread,_,_), Campamento), % 5)
member(espacio(_,_,_,rojo,veinteynueve), Campamento), % implicito
)
member(espacio(_,_,_,negra,cuarentaytres), Campamento), % 6)
member(espacio(_,_,_,azul,treintaycinco), Campamento), % implicito
)
member(espacio(bill,_,_,_,veinteynueve), Campamento), % implicito
)
member(espacio(steve,cindy,branch,_,_), Campamento), % implicito )
member(espacio(_,cindy,_,_,cuarentaytres), Campamento), %
implicito )
member(espacio(tom,laura,forrest,_,_), Campamento). % implicito )
% member(espacio(tom,_,_,blue,_), Campamento). % implicito )
% member(espacio(_,mary,_,red,_), Campamento). % implicito )
append([X|Y],Z,[X|W]) :- append(Y,Z,W).
append([],X,X).
member(X,[X|_]).
member(X,[_|T]) :- member(X,T).
% perm2(X,Y, X,Y).
% perm2(X,Y, Y,X).
/*member(X,[X|T]).
member(X,[H|T]) :- member(X,T).*/
(Your program has several errors: In particular use_module(xx) must be prefixed with :-)
constraints/1 essentially looks like this:
constraints(L) :-
member(a, L),
member(b, L),
member(c, L),
member(d, L).
So you demand that a, b, c, and d are elements of L. But nowhere do you state how long the list should be. You can observe this by looking at alternate answers pressing ;Return.
?- constraints(L).
L = [a, b, c, d|_A]
; L = [a, b, c, _A, d|_B]
; L = [a, b, c, _A, _B, d|_C]
; false.
To fix this, add length(L, 4) at the beginning, before any goal member/2.
OK, it is my Friend!!!
Thanks very much for all you help!!! it is the code like how i tell you:
/*
ORIGINAL
1. Bill, who is not married to Laura, didn't drive a black van.
2. Chuck and his wife Brenda were not camped in space #35. Brenda's last name is not
Forrest.
3. The Lewis couple, who drove a tan van, camped in space #31.
4. Tom camped in a space numbered lower than the one Cindy camped in but higher than the
couple who drove in the red van did.
5. Tom isn't married to Mary Tread. Steve Branch didn't drive a blue van.
6. The couple driving the black van camped in space #43.
*/
%:- use_module( library(basics)).
:- use_module(library(lists)).
campamento([espacio(_,_,_,_,_),
espacio(_,_,_,_,_),
espacio(_,_,_,_,_),
espacio(_,_,_,_,_)]).
constraints( Campamento ):-
length(Campamento, 4),
% campamento(Campamento),
member(espacio(chuck,brenda,_,_,_), Campamento), % 2)
member(espacio(_,_,lewis,cafe,treintayuno), Campamento), % 3)
member(espacio(_,mary,tread,_,_), Campamento), % 5)
member(espacio(_,_,_,rojo,veinteynueve), Campamento), % implicito
member(espacio(_,_,_,negra,cuarentaytres), Campamento), % 6)
member(espacio(_,_,_,azul,treintaycinco), Campamento), % implicito
member(espacio(bill,_,_,_,veinteynueve), Campamento), % Implicito
member(espacio(steve,cindy,branch,_,_), Campamento), % implicito
member(espacio(_,cindy,_,_,cuarentaytres), Campamento), % implicito
member(espacio(tom,laura,forrest,_,_), Campamento). % implicito
append([],X,X).
append([X|Y],Z,[X|W]) :- append(Y,Z,W).
member(X,[X|T]).
member(X,[H|T]) :- member(X,T).
perm2(X,Y, X,Y).
perm2(X,Y, Y,X).

Resources