I'm populating the Bokeh dropdown menu from a list of values and showing the output in two ways: An HTML file, and in a local app through the command line (bokeh serve --show myapp_3.py)
When doing the HTML output the dropdown properly shows the correct values, but when I run the same exact code with the app, the values look like they are from an older run and aren't the ones being passed to the menu.
What would cause the dropdown values to persist from an older run or not update properly when running the code through the command prompt?
It still happens when I rename the .py file.
It it helps, this is how I'm populating the dropdown:
optionslist=list(dataframe["Values"])
menu= Select(options=optionslist,value="",title="DropDown")
layout=column(menu,p)
def callback(attr, old, new):
source.data={'x':data_x, 'y':data_y}
menu.on_change('value', callback)
curdoc().add_root(layout)
Related
I am using CCS to program a MSPFR6989 and I’ve debugged and the code is working but I can’t get variables or registers to come up. It remains blank. enter image description here
use double click onto your variables and choose watch expression. You can find your variables under expression from now. If it shows you its name but a red error message try step by step debugging, works for me everytime.
I am working with Progress-4GL, release 11.6, appBuilder and procedure editor. I can't upgrade to a more recent IDE.
I have created a temporary table, containing a LOGICAL field (shown as a checkbox), and I'm showing the values of those checkboxes inside a browser object.
Now I need the following piece of source code:
ON LEAVE OF temptable.checkbox_attribute IN BROWSE browser_object
DO: ...
END.
The problem is: now I would like to open this file in appBuilder, but as there are no ANALYZE-SUSPEND and ANALYZE-RESUME lines around it, the appBuilder will remove those lines.
In order to avoid this, I'd like to write those lines myself, but how can I do that?
For your information: in the appBuilder it is only possible to add events to existing statical objects, so adding events to temporary tables can't be done.
I already tried copying such a line from another event, but as the mentioned _CONTROL ... objects don't correspond, this doesn't work.
You don't need &ANALYZE-SUSPEND / &ANALYZE-RESUME. Just put the whole trigger in the main block of the program, after
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK B-table-Win
(Or just navigate to section Main Block in the Section Editor of the AppBuilder.)
The AppBuilder does not recognize this as a separate user interface trigger.
In my notebook, I print some data from scraped web pages. Some of these are hyperlinks without tags e.g. https://stackoverflow.com. Unfortunately, Notebook prints these out as an actual hyperlink (i.e. wraps it in tags) on the output page and shortens it. (So the final result in HTML looks like this: https://stacko....) The field is set to code, but this still happens. Is there a way to disable this behaviour?
Solution:
Enter the following text in the empty cell of your Jupyter notebook:
%%javascript
Jupyter.utils.autoLinkUrls = function (txt) {
return txt;
}
Explanation:
The ability to locate URLs in text output and convert them to hyperlinks appeared in IPython notebook (a Jupyter's predecessor) as a result of a merge request in Oct' 2012. Since then every piece of output is scanned for URLs and each found URL is replaced with an anchor <a href=.../>. There's no easy way to alter this behavior because function autoLinkUrls(...) doesn't provide any configuration parameters.
So, the only way to disable URL "autolinking" is to simply replace JavaScript function autoLinkUrls, which is exposed through global Jupyter object, and %%javascript magic command makes the job done.
I have a table with different methods, for example, one of them is validateWrite, when setting Field A to value X, Field B and C has to be filled in.
Suddenly (without changing code, I have compared the code with the test enviroment, it does work there) the validateWrite has stopped working.
I have tried to recompile the table, but that did not work.
Any idea why it suddenly (without making other modifications in this enviroment, or generating a CIL) stopped working and what i can try to solve it?
If some piece of code is calling table.doInsert(), it skips the validateWrite() method.
If the environments are truly identical, then I would try closing your AX client and deleting your user caches (see http://dynamics-ax-live.blogspot.com/2010/03/more-information-about-auc-file.html) where you delete all of the *.auc files located at C:\Users\[Username]\AppData\Local
In addition to what that tells you to delete, I'd also remove the *.kti file and all of the files & folders inside of C:\Users\[UserName]\AppData\Local\Microsoft\Dynamics Ax
Then open AX, see if the problem still exists. Then full system compile, CIL build, and delete your usage data.
The preferred route though would be to just drop a breakpoint in and debug the code to see what the execution stack is.
I have a shell command that I am running in a RealBasic App, and until now I've just been reading the output, but it requires user input. Is there something I could use to embed something like a terminal or a console application that could run a command, show the output, and take the input, maybe in a widget looking like a text area, like many IDEs and code editors have?
There is no pre-built control in RealStudio to accomplish this. However it's trivial to implement with a TextArea control and a Shell object set to Mode=2.
An example of this is included in the RealStudio Examples directory in your RealStudio install directory (by default on Windows, C:\Program Files\REAL Software\Real Studio\Examples\Shell\Interactive Shell.rbp.)
Could you separate the output and input, or would this not make sense for your use case?
If you could, then you could simply use a TextArea to display the console app's output, just keep appending to the TextArea's text. Then use a TextField for single line input underneath the TextArea, or whatever else makes sense for entering the params you need to send to the console app.
Then you can use a button (or catch [RETURN] key up in TextField) to grab the input and pass on to the console app.