What does "no compatibility mode selected" means in ngspice and how to solve it? - circuit

I want to write the code for fullwave bridge rectifier with resistance as load and I wrote the following code. But it showed an error. It showed "No compatibility mode selected". This is the code I wrote.
fullwave bridge rectifier
*Specifying circuit components
v1 1 0 sin(0 15 60 0 0)
rload 2 3 17k
d1 1 2 mod1
d2 0 2 mod1
d3 3 1 mod1
d4 3 0 mod1
.model mod1 d
.tran .5m 25m
.plot tran v(1,0) v(2,3)
.end
I am new to ngspice and just currently learning it. I tried to browse through its manual but couldn't get what I am searching for. I also tried to browse through various sites to rectify my mistake in the code but I couldn't get any solution of what changes to do in the code. I need help to rectify my code proceed my learnings in ngspice.
Thank You.

set spicebehavior=hs
hs stands for hspice but you can use
set spicebehavior=all

Related

Zabbix Active check log[] logrt[]

I'm trying to create right regexp for log file I would like to monitor, but I have tried many things and they don't work.
What I would like to monitor...
My log file looks like this:
17-06-14 Name Succ Fail Reject
11:36:33 BalanceCheck 2 6 10
Connections 3 0 0
Transfers 0 0 0
17-06-14 Name Succ Fail Reject
11:37:33 BalanceCheck 2 6 1
Connections 3 0 0
Transfers 50 2 10
The value I'm trying to have in output is for example "2". Which should be found under Succ and BalanceCheck.
I was trying to use:
log[/tmp/logfile,,"BalanceCheck *([0-9]+)",,,,\1]
But it shows in Zabbix that it is not supported, because of too many outputs.
Also I can't create a regex for Fail value to work properly....
You are currently using:
log[/tmp/logfile,,"BalanceCheck *([0-9]+)",,,,\1]
Zabbix log[] key syntax is:
log[file,<regexp>,<encoding>,<maxlines>,<mode>,<output>,<maxdelay>]
Notice how the second parameter should be regexp, but you have it put in the third parameter. Try removing the first or second comma in your key.

OpenSceneGraph CullVisitor::apply(Geode&) detected NaN

I am trying to use OSG for displaying some cubes on the screen.
at some runs it works perfectly but sometimes it does not display anything, just prints this in the virtual console:
CullVisitor::apply(Geode&) detected NaN,
depth=nan, center=(0 0 0),
matrix={
-1 0 0 0
0 0 1 0
0 1 0 0
-nan -nan -nan -nan
}
the reason why it sometimes works and other times doesn't is probably that the cubes are positioned randomly, and some positions apparently do not work.
The question is:
what does it mean and how do I avoid it?
note: you may be tempted to downvote this question right away, but please note that google only provides miserably useless results and I see no way of solving this problem other than asking for help.
Did you search your code for the usual list of suspects?
see:
http://en.wikipedia.org/wiki/NaN#Operations_generating_NaN
It's also possible you're trying to cull your scene before an object is fully initialized (no position yet) - the fix would be to not add it to your scene until you've initialized it. But we're really just guessing unless you post some of your relevant code.
The point is the view matrix is not correctly initialized.
Perform a check and, if the view matrix is invalid, replace it by the identity matrix:
// if the view matrix is invalid (NaN), use the identity
osg::ref_ptr<osg::Camera> camera = _viewer->getCamera();
if (camera->getViewMatrix().isNaN())
camera->setViewMatrix(osg::Matrix::identity());

Mac 2011 using some functions in VBA

I have recently transferred a working set of routines from Windows Excel 2003 and tried to run them in Excel for Mac 2011. It fails on the first attempt to use the left function. With the error message "cannot find project or library". I have tried setting up a test function to run various text functions and things like Len work but neither left right or mid. The routine is the start of a process to handle exported Access data. Do not think that is relevant as the routine does not start because of the problem with left.
This is my test code.
Function testfunctions()
Dim carrier, carrier2
carrier = "Alpha1"
carrier2 = Left(carrier, Len(carrier) - 4)
MsgBox carrier
End Function
Any suggestions greatly appreciated!
What happens if you remove an errant space in this line (yours)
carrier 2 = Left(carrier, Len(carrier) - 4)
Change to this:
carrier2 = Left(carrier, Len(carrier) - 4)

What code language is this?

I know, silly question, but I am not a programmer and really need to known...
to look-for-food
if food > 0
[ set color orange + 1
set food food - 1
rt 180
stop ]
if (chemical >= 0.05) and (chemical < 2)
[ uphill-chemical ]
end
Thanks
This language is called LOGO. It's often used with Turtle -- drawing lines on the screen.
Related Anecdote:
My first encounter with a computer was around 1985, in my classroom we had an Apple (Apple ][ probably?). This was one of the main programs that was available. I had learned how to do to in order to define a subroutine. I tried it once, but I couldn't remember the syntax for defining the specifics. And then when I tried to exit the to routine definition context, I couldn't remember how to exit it. The teacher could sense that I was confused, and was coming over to help me. I figured I'd be in trouble for straying beyond the scope of the exercise that I was supposed to be working on, and figured the teacher wouldn't know how to recover either. I panicked and powered off the computer. My first "did you try turning it off and on again?" experience! :)

SPSS can't assign string variable

The first block of code runs fine but i where it says "value of F14a" i want it to actually assign the string that is stored there to F14a_pd3. But the Syntax below that should do that crashes SPSS for me. F14a is a string variable of length 50.
Working useless Syntax:
STRING F14a_pd3 (A50).
DO IF NOT F14a="missing" & papadex=3.
COMPUTE F14a_pd3="value of F14a".
ELSE.
COMPUTE F14a_pd3="missing".
END IF.
FREQUENCIES F14a_pd3.
Crashing Syntax:
STRING F14a_pd3 (A50).
DO IF NOT F14a="missing" & papadex=3.
COMPUTE F14a_pd3=F14a.
ELSE.
COMPUTE F14a_pd3="missing".
END IF.
FREQUENCIES F14a_pd3.
You should consider calling technical support. Your syntax is fine, and even if it wasn't it shouldn't make anything crash (at worst you should just get an error message).
Run this reproducible example demonstrating your syntax. If this doesn't "crash" SPSS, then it is possibly a problem with the current file you are working on.
data list free / F14a (A10) papadex (F1.0).
begin data
missing 3
xxxxx 3
missing 0
yyyyy 1
zzzzz 0
end data.
STRING F14a_pd3 (A10).
DO IF NOT F14a="missing" & papadex=3.
COMPUTE F14a_pd3=F14a.
ELSE.
COMPUTE F14a_pd3="missing".
END IF.
LIST ALL.
Which produces the table;
F14a papadex F14a_pd3
missing 3 missing
xxxxx 3 xxxxx
missing 0 missing
yyyyy 1 missing
zzzzz 0 missing
That syntax works fine for me. When you say SPSS crashes, exactly what happens? And what else is going on in that session? What version and platform are you using?

Resources