Is there a way to attach the VS Debugger to a local site and have it use & step through the App_Data\CodeRepository source instead of using the PX.Objets.dll file? (For reference & help understanding what's happening 'under the hood')
I don't know how to do what you want, but I propose you a workaround. You can copy/paste code from App_Data\CodeRepository into your project, rename page to your, for example instead ar301000.aspx create page ar301011.aspx and bind it to copy/pasted graph. And now you can debug App_Data\CodeRepository simply and easily. Also if you wish you can even modify it.
Related
I'm implementing an app, which uses (kotlin.text.)StringBuilder instances at various points. Since today, I have to double-click the variable name and, after that, double-click 'value' to see the content shown as one character per line (next to 'value', it also says e.g. char[20]). Until yesterday, I was able to see their contents in the variables view of the debugger right after double-clicking the variable name and - what is even more important - in one single string line. I have to compare the content of several instances and therefore cannot work efficiently with this view.
Is there some kind of setting, which needs to be reset? Has anyone else experienced this? Is this an intended behavior or am I the only one having this bug/behavior?
After getting this, I already tried restarting android studio, as well as upgrading all components to the latest version. I also tried creating an entirely new project with only one StringBuilder to rule out any problems in my current project - but, no luck so far.
Any hint would be much appreciated!
You need to add a .toString() call to your string builder to get the value of the string.
I finally figured out the solution to the problem. It was indeed a setting I had to reset. As I did not actively change it, this solution might be useful to others, too.
Via 'Setting > Build, Execution, Deployment > Debugger > Data Views > Java', I found the option 'Enable 'toString()' object view:'. After selecting this option, everything worked again as before.
Thanks to everyone, who tried to figure out the solution!
Main Question :
I have created various custom functions that I frequently use. I would like to store them in a repository somewhere and call them whenever necessary. I know that I can save all those functions in an Excel file and save it in OneDrive. But I would like to save them somewhere I can edit and share them easily like GitHub.
And finally, if it is possible, can we make a private repository? If i want few of my functions to be shared privately, can I protect/lock them using a password?
Helpful Resources:
Understanding the following probably might be helpful in answering this.
Resource 1:
There is a function called #shared in PowerQuery which lists down all the functions available and their respective description. You can know more about it at the following post.
I think understanding how does this function (#shared) work and Where is this information being extracted from will be helpful in answering My main question above. Which is basically, how can I make something like this for my custom functions?
Resource 2:
One possible help for this question would be an existing repository in Github by Hugoberry.
Note:
I'm not a coder, but I'm comfortable in reading/understanding codes.
I don't understand Github very clearly.
Edit 1:
For those who are looking for an answer to this question, the answer provided by Nacho works for creating a function with Manual Entry(Text/Number) inputs.
It does not work for functions that refer to a table/parameter.
After taking a long path on this I solved it. Below are the steps to do this:
First create a .pq file with Notepad like this example and push it to GitHub:
let
TextAsNumber = (valor as number) =>
let
Mostra = "The number is: " & Text.From(valor)
in
Mostra
in
TextAsNumber
Then go to the file in github and click on "Raw"
Copy the URL. Open Power Bi Desktop edit queries. Get Data from blank query and paste this:
= Expression.Evaluate(Text.FromBinary(Web.Contents("https://raw.githubusercontent.com/ibarrau/PowerBi-code/master/PowerQuery/PQFun.pq")),#shared)
That code will create you the function from repository.
Note: The same thing can be made with local path too, just replace Web by File on "Contents". Like so:
= Expression.Evaluate(Text.FromBinary(File.Contents("C:\Users\username\Documents\Folder\Sub-Folder\PQFun.pq")),#shared)
Hope this helps you to manage better the custom function repository.
PS: I'm not sure if you are going to be able to refresh in Service.
I want to use Blockly to do some calculations, and then generate text files (as opposed to exporting code to JavaScript, Python, PHP, etc.)
I can’t see an obvious way to create my own blocks to do this in Blockly, so using AppInventor (Version: nb168), I got storing and retrieving files to work, in a crude test app on my Android tablet.
In AppInventor/Designer mode, clicking Storage/File creates a “Non-visible component for storing and retrieving files. Use this component to write or read files on your device.”
Then, in AppInventor/Blocks mode, clicking the “File1” icon gives access to 7 “file type blocks”, e.g. AppendToFile, Delete, ReadFrom, SaveFile, etc.
Is it possible to create similar “file type blocks” to use in Blockly Web?
I have limited programming knowledge, so would appreciate simple answers, please.
Thanks, Pete.
Andrew N Marshall from Google/Blockly has told me this:
"This is absolutely possible ...as long as you willing to work within the browser's security restrictions. The resulting files will be need to be manually "downloaded" one at a time, rather than written directly to the user's file system.
... I would start understanding what JavaScript functions are available to you. Attempt to construct a string and save it via a download dialog...
That means the "file" contents are really just a string in memory, a JavaScript variable. We have lots of "Text" blocks that can do a variety of operations on strings. If those are enough, you'll only need one new block to identify the string variable and initiate the download process.
Otherwise, you'll need to think about what blocks you want, and how they operate. They may operate on a specific variable in the JavaScript VM, not necessary exposed as a variable to Blockly.
Either way, you'll need to learn how to create a block and a Blockly app. We have a code lab that will walk you through all the steps. You'll learn how each block generates a string of code, and in your case, that code will be related to the download code I mentioned earlier."
So I'll press on - I just wanted to be sure my goal is actually achievable before I started.
Thanks, Pete.
For example, if I'd like to read the source code of the process.chdir JavaScript function, how can I do that?
I can find process.js on github but not sure that's the right file. Is there an easier way to navigate from docs directly to source?
There is not a simple way to navigate directly from the web doc to source. To find the code for a specific function, you have several choices:
Create a small test app that calls the function in question, run node-inspector and step into the function of interest. That will take you right into the source code that your installed version of node.js is running. You can then continue stepping or just examine the local source code shown in the debugger.
Grep your own node.js installation. Since all the .js files are right there and in plain text, you can find it there.
Go to Github like you've done and find the relevant function. This is not always easy to do (as you've discovered) and it doesn't guarantee that you're looking at the source for the exact same version you have installed. If you're a Github wiz, you can always figure out how to see the right version, but that's a bit more work.
If the code you want is actually implemented in native code, then you're going to have to use options 3 or maybe option 2 (if you have native sources locally).
Xpage (listPostits.xsp) has a "View" container control, where one of the column is set "show values in this column as links".
Now, here comes "Strange behaviour".
When i work with this application on my own (developer) PC (Win XP, Chrome or IE), the Domino generate the link, which can't be really processed:
/servername/db/postit/postit.nsf/listPostits.xsp/onePostit.xsp?documentId=many_numbers&action=editDocument
Namely, the Bold-marked portion shouldn't be there ! This portion is the name of the XPage, where the View control is in.
When i work with the application from other PC (Mac, Firefox) then i get the correct link (the same as above but without the XPage name inbetween):
/servername/db/postit/postit.nsf/onePostit.xsp?documentId=many_numbers&action=editDocument
update: let us leave for the moment the differencies in generated links between two machines. The first question is - why the extra portion is inserted into automatically generated link?
After playing around i think i might have found the reason for this strange behaviour. Namely, the "Substitution" Rules on the server side. One of them is to substitute "*/postit/all" with "/db/postit/postit.nsf/listPostits.xsp"
If i switch it off, then the Links are generated properly. Still, it's pretty strange to me that these settings influence the way Domino generates the links. I thought it works on the fly with them and those settings have nothing to do with the way how Links are generated inside the application.
So, the help now is needed regarding Web Site Rule Topic, but for that, i guess, i have to create another topic. But in case somebody has some good Info on this, please share it with me. I'm a bit confused at the moment :)
Final Update: Spent some more hours of testing and the results confirmed the initial idea.
If i open the page with the standart URL, i.e.
http://servername/db/postit/postit.nsf/listPostits.xsp then everything is fine, links are generated properly. When i however open the same page with short URL http://servername/postit/all , then server adds the substitute URL (db/postit/postit.nsf/listPostits.xsp) to every single link he generates automatically to be used as the link to open/edit the underlying document.
Is it bug or feature ? Don't know.
As a workaround (because i want to keep simple URL's for the application) i have to manually generate links.