Does anyone know/have the code for connecting two pc's for variable transfer in qbasic? Using the _OPENHOST , _OPENCLIENT , and _OPENCONNECTION.
Related
I am trying to build a subscriber function that goes like this:
Every user register his machine name to a list using
hostname:enlist .z.h
The function loops through the hostname list, creates connection and do some function {u:hopen(`:x:200;5000);u"somefunction[]"} each hostname
The only issue is .z.h is of a symbol where x should have no type in order to have this: u:hopen(`:HURNMW052:200;5000) instead of this u:hopen(`:`HURNMW052:200;5000)
The same thing happens using IPs ”.” sv string”h”$0x0 vs .z.a = "161.16.16.23" not 161.16.16.23
Any idea how I could cast those or other solutions to create a loop of handles?
You can use a string to open a connection. See below.
q)":",string[.z.h],":8009"
":homer:8009"
q)h:hopen(":",string[.z.h],":8009";5000)
q)h
3i
This reference on the kx wiki is useful for opening connections in kdb.
I am trying to get the maintenance key expiry month and year of lauterbach JTAG programmatically. I am using t32apinet for that. Is there a way to read the maintenance information using the api?
You can get the date of you maintenance key via the PRACTICE function LICENSE.DATE(<idx>), where idx is the number of the attached serial number as it appears in the LICENSE.LIST window. Note, that one debug cable, plugged to your PowerDebug, can have up to 5 serial numbers and thus, also up to 5 maintenance key.
To get idx for the currently running PowerView executable use the PRACTICE function LICENSE.getINDEX().
Putting both together you get: LICENSE.DATE(LICENSE.getINDEX())
You can test it by using the PRINT command in PowerView:
PRINT LICENSE.DATE(LICENSE.getINDEX())
You should get a string in the form of YYYY/MM e.g. 2020/07
To use a PRACTICE function via the remote API, use the API function T32_Cmd() together with the TRACE32 command EVAL and then get the result via the API function T32_EvalGetString().
E.g. in C/C++:
char mdate[4096];
T32_Cmd("EVAL LICENSE.DATE(LICENSE.getINDEX())");
T32_EvalGetString(mdate);
printf("End Date: %s\n", mdate);
I am not skilled with Visual Basic .NET at all, but I guess there it should look like this:
Dim mdate As String
T32.Cmd("EVAL LICENSE.DATE(LICENSE.getINDEX())");
T32.EvalGetString(mdate);
Log("End Date: " + mdate)
New versions of TRACE32 support also the slightly nicer API function T32_ExecuteFunction().
I have some questions about a PowerShell script I need to write:
My script gets a list of servers' IP and it's output has to be the status of each server's WakeOnLan parameter.
The output also has to include the time it took my function to return all the statuses of all the servers.
Measure-Command does not work in this case, because my function is pretty long and it gets a list of hundreds IPs.
Does anyone know how to make my function write the following output:
"The total time of providing WakeOnLan status for ___(number) servers is ___(minutes).
After writing my function in some cases it can not run the Connect-HPEBIOS
command (when the output is more than one IP): It prints that it can not connect because of credentials (even though they are being written in my function correctly), but after trying to call my function with (only that specific IP - and not a list of IPs) the function works properly without printing an error about the credentials.
Does anyone have an idea what should I do in the cases where my output is more than one IP? How can I fix it?
One more question- Do I have to refer in my function to the different possibilities of different ILO versions? Can there be problems performing the Connect-HPEBIOS command in the different versions?
Thanks a lot!
I am working on a model generation script to automatically generate Simscape models from a library of components with varying ports. Due to the vast number of ports that need to be connected across the model, I am looking for a good way to set up which ports need to be connected to each other. The best solution I have come up with so far is to name each port with a unique tag that indicates what other ports in the system it should be connected to in the generated model. However, I am not able to obtain the name of any physical port. It is labeled on the mask, but the 'Name' parameter always comes back empty. Here's what I've tried:
h = get_param(gcb,'PortConnectivity')
port = h(1).Type %This only returns the physical port #, not custom name
h = get_param(gcb,'PortHandles')
port = get_param(h.LConn(1),'Name') %This returns an empty cell array
Not sure where to go from here. Any ideas on how to solve this? Thanks!
You can use:
name = get_param(gcb, 'Name');
to get the port name. A general tip for finding the right block property, run:
get(get_param(gcb, 'object'))
this will display all block properties and their values.
for information..
i have some about machine maintenance schedule...for recondition and overhaul machine..
from the schedule there are information of when each machine happened to recond and overhaul. has actual date and due date of machine for recond or overhaul in every year.
as example
machine 1
actual date---2/1 (Recond)
due date------12/1
actual date---14/1 (Recond)
due date------24/1
actual date---24/1 (Overhaul)
due date------3/2
actual date---18/2 (recond)
due date------1/3
so..can you help me how to convert this data to normal distribution graph by using matlab..
because i want to compare each machine behavior..
thanks a lot..
i hope you can answer me as soon as possible
I am not quite sure what you want to do, but here are some possible answers to your question:
If you want to generate random data that follows a "normal distribution", use:
data = mean_value + (randn(1,N) * standard_deviation)
If you want to parse out data from the "logfile text" you mentioned, you could try:
line = [d1,m1,d2,m2] = sscanf(line, 'actual date---%d/%d (Recond) due date------%d/%d');
This will parse out the day/month values from the text.