I have a case structure and inside it I have a Boolean output to a LED. I want to use the LED again in another case, but whenever I try to copy the output it just creates a new one with a new LED. Is there a way to have them go to the same LED? I will also need to do this with the inputs, but I am guessing that it is a similar procedure.I cant wire it to the outside, because I need it to change it while it is inside some other loops. An image of the program is below. Sorry that it is messy this is my first code. Thank you for your help.
Current Use of LED:
Where I want to add it:
If it is not possible please let me know as well.
What you need to do is use local variables. If you right-click on the LEDs and select Create>Local Variable it will allow you to write to them in more than one place.
But Caution: If you do this a lot your code will get very difficult to work with. In this case, you have no choice since you can't place them in one place where they can wired from both sources but I always recommend trying to wire them first if you can.
What jamesmc86 says is correct.
However, to give you a complete overview, and if you want to use a tool that has already a built-in error terminal, you could use property nodes. In this case, you should select Value property node.
Check them out, they are very powerful and allow you to change all properties of a control/indicator.
Related
The question is : what are the NET USE possible outputs?
You can drown yourself with websites explaining how to use NET USE command, but not a single one about what is coming out of it.
In my case I'm interested in the various error messages, and the interaction with the Powershell automatic variable $LASTEXITCODE. I want to handle its output correctly but I don't know what can even happen (and no, I won't use New-PSDrive).
Does someone knows the what or where I can find the information ?
Thanks
You can use the example in https://www.compatdb.org/forums/topic/20487-net-use-return-code/ to obtain a list of the numerical codes for your evaluation.
If you want to dig deeper take you need to download the Win32 SDK and go through the definitions in the header files (see https://learn.microsoft.com/en-us/windows/win32/api/winnetwk/ns-winnetwk-netresourcea etc).
Here is my problem with my dropdowns:
As an automation tester, I have some issues using Selenium's Select(); method 'bout dropdown fields. If I have to run a test in multiple cycles and select different option from the dropdown every next cycle, I just used Select(); method and it worked great.
Now the problem is that in the HTML code I do not even see the option of the dropdown. The field is changed to dynamic, it is not static anymore.
How can I work around this feature or is it just a bad programming practice?
I think it's not bad practice to have dynamic options in a dropdown menu.
To write an end-to-end test for this it depends how dynamic these options are. If they change from release to release (e.g. the available product categories in the system), you should probably encode them in your test. In that way the test will have to be updated if the options are updated, which makes sense (the test will fail if it doesn't find the options it expects).
If the options change by external factors (e.g. the current top 10 trending topics on Twitter) then you cannot encode them in your test. You should then probably try to pick one by index (e.g. the first one) and parameterize the test to handle any value that might be there. Alternatively you could stub the 'TrendingValuesFromTwitterService' (staying with my example) to deliver a fixed set of values for your testing purposes.
Normally static data with Select, Dropdown or combobox is a best practice. Unfortunately, sometimes we need dynamic data with Selects. The best way is to use Fluent Waits for Select contains your option. Also, Thread.sleep() is another solution but it is not preferable. However, it is exact solution. Try to implement fluent or implicit waits for your select options.
For example, ElementToBeVisible or ElementToBeExists etc.
Checkout Selenium Docs
I'm working on a community connector, my fields are getting pulled in properly, but trying to use it in a report I get the following error below.
I'm less concerned about the specific error, but more concerned how I even figure out what is going on or breaking on the server.
Anyone figure out good ways to debug these errors?
After a lot of research on this and digging around. I found that it came down to an invalid schema. ugh. I noticed that the getData, wasn't even being ran when trying to use data from a report. This made me think it was failing elsewhere.
In my case I was a prebuilt json object, and passing that to the schema field for data studio.
Unfortunately google provides no feedback for mis-configured JSON schemas.
:sigh:
I simplified the schema and found the issue was a incorrect data type. Once I fixed this all worked :)
This method is mentioned here, and even google data studio says its hard to debug.
https://developers.google.com/datastudio/connector/semantics
Its nice to have the schema seperate from code, but careful that the schema is correct otherwise you'll run into this very generic issue. Until they add more logging in this area.
Hope this helps someone!
Sharing my discover here just in case, I was with the same case, but in my case this problem was occurring in a Pie Chart, but the same Metric combined with another segmentation didn't appear this problem.
After some test I found which case generates the problem, my problem was happening because this metric, in a specific segmentation, generates a total value negative, what Pie Charts have problems to show.
My field has string and numeric values too, but this is not a problem (until now at least). To solve my problem I create a new field where negative values are replaced by 0 (this doesn't make impacts at insight I need, because this values I don't need to track or show them in a Pie Chart).
So my suggestion here is try to understand if it is happening with a specific segmentation, or all time. With this segmentation, try to create filters and display each segment only, if this problem occurs you will discover which segment creates the error. Try to check the field you are making of sum, mean, or anything else, if he have negative values. If it happens, Pie Chart is not a possibility to show that, or you need to filter, replace, make any rule.
AS3
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
Is there a way to temporarily suppress this on a specific block of code?
I am creating a HUGE dynamic 3d array of objects, 1000x1000x1000 and need the build to actually finish the initializing.
Your best bet would be to try and refactor your code. Perhaps you can make use of this tutorial which deals with the exact problem you are having.
http://www.senocular.com/flash/tutorials/asyncoperations/
Increasing the timeout is one option, however I would also suggest considering an approach that would build your arrays over multiple frames, that is splitting the work up into separate jobs. As long as you give control back to the Flash Player every once in a while, you will not get this exception.
I'm not certain of the specifics of your problem, however you will need to find a way to parallelize or just simply segment your calculations. If your algorithm centers around one major loop, then consider creating a function that takes all of the arguments necessary to record the context of a single iteration. Then, create a simple control loop that will call this function and determine when to wait until the next frame and when not to. Leveraging AS3 closures can also help with this.
Look for the script execution time limit in the "Publish Settings" (Flash). If you're using Flex, maybe this one can be useful: http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html (check default-script-limits, max-recursion-depth, max-execution-time). Oh! It seems there's apparently no way to make it behave in a different way on a specific piece of code (it is a global setting).
I do not approve the increse timeout option. Because for all this time your appllication is just hangs the whole Flash player. And normaly user thinks it is down, and forses it to quit.
check this one out: How to show the current progressBar value of process within a loop in flex-as3?
And then you can even show the progress which would be really more confident for you and for user.
Is there any tool which will allow me to perform a free text search over a system's code, but only over the code which was actually executed during a particular invocation?
To give a bit of background, when learning my way around a new system, I frequently find myself wanting to discover where some particular value came from, but searching the entire code base turns up far more matches than I can reasonably assess individually.
For what it's worth, I've wanted this in Perl and Java at one time or another, but I'd love to know if any languages have a system supporting this feature.
You can generally twist a code coverage tool's arm and get a report that shows the paths that have been executed during a given run. This report should show the code itself, with the first few columns marked up according to the coverage tool's particular notation on whether a given path was executed.
You might be able to use this straight up, or you might have to preprocess it and either remove the code that was not executed, or add a new notation on each line that tells whether it was executed (most tools will only show path information at control points):
So from a coverage tool you might get a report like this:
T- if(sometest)
{
x somecode;
}
else
{
- someother_code;
}
The notation T- indicates that the if statement only ever evaluated to true, and so only the first part of the code executed. The later notation 'x' indicates that this line was executed.
You should be able to form a regex that matches only when the first column contains a T, F, or x so you can capture all the control statements executed and lines executed.
Sometimes you'll only get coverage information at each control point, which then requires you to parse the C file and mark the execute lines yourself. Not as easy, but not impossible either.
Still, this sounds like an interesting question where the solution is probably more work than it's worth...
-Adam