What would be the name of a LIFO structure with the following behavior? - naming-conventions

I have been documenting myself about stacks, queues and deques for a small project.
I will be requiring use of both stacks and queues for the project, and another type of structure, something similar to a stack, but that removes the final elements, such as this:
Stack from top to bottom (max 5 elem): [B][C][D][E][F]
Push A, becomes [A]=>[B][C][D][E]=>[F], result: [A][B][C][D][E]
I have been searching around wikipedia and such, but I don't know how to call this other than "some kind of stack". Results are LIFO, so popping would return A in the example, not F. The code is done as well, so I don't ask for help on that aspect.
My question is simpler: what would be the proper name for this structure?
EDIT: After examining the G5 library as suggested below. I decided to call them "Limited Stacks" or "Lstacks" since it's a name already used in a library. That would make the code more readable. Thanks to everyone!

That looks like a FIFO stack to me. Item A is your last in, Item F is your first out.

Related

Strange prefix (/A\) in ABAP call stack

Generally I try to make my questions Reproducible.
In this case I couldn't find a way. Please feel free to guide me how to grab more details and I will attach.
In some cases, we are using the ABAP call stack programmatically to get additional info. I.E: logging user calls, accessing variables from lower calls in the stack as a last resort when there is no other proper way to retrieve them.
We have encountered a case, in which weird chars were added as a prefix in the call stack for central programs of HR module 'MP9XXX00'(Module-Pool generated programs for customer-specific PA infotypes). The weird chars are /A\.
The full string for calling program is /A\MP9XXX00.
The code used to get the whole call stack:
lt_call = cl_abap_get_call_stack=>format_call_stack_with_struct( cl_abap_get_call_stack=>get_call_stack( ) ).
There aren't such programs /A\MP9XXX00 in SE80.
Also, when tried to receive variables from calling program as mentioned, like this:
ASSIGN |( { ls_call-prog })PSYST| it failes, it caused dump. And when we looked into ST22 the stack didn't contain any /A\MP9XXX00 but just MP9XXX00 (ls_call-prog contained /A\MP9XXX00).
As said, we didn't manage to reproduce and debug it. just saw the result.
Where could those chars come from?
What we thought of
We thought that it might be related to the fact that our customer namespace starts with /A, but still, why it's shown up? why just a few times? why just the first two characters? and where did the other \ come from?
We thought that the prefix /A\ might be temporary added to (those) program names, say while importing related transport requests. And that maybe A is for Active/Activating. What made us think so is that it happens more in QA than in production.

How to build a call graph for a function module?

A while ago during documenting legacy code I found out there is a tool for displaying call graph (call stack) of any standard program. Absurdly I wasn't aware of this tool for years :D
It gives fancy list/hierarchy of calls of the program, though it is not a call graph in a full sense, it is very helpful in some cases.
The problem is this tool is linked only to SE93 so it can be used only for transactions.
I tried to search but didn't find any similar tool for reports or function modules. Yes, I can create a tcode for report, but for function module this approach doesn't work.
If I put FM call inside report and build a graph using this tool, it wraps this call as a single unit and does not analyze deeper. And that's it
Anybody knows a workaround how we can build graph for smth besides transaction?
The cynic in me thinks RS_CALL_HIERARCHY was left to rot. Sandra is right, it definitely used to work. Once OO came to abap, interfaces and dynamic/generic code became possible. So a call heirarchy based on static code analysis was pushing proverbial up hill.
IMO the best way to solve this is a FULL trace and then to extract the data from the trace.
There are even external tool that do that.
This is of course, still limited as running a trace on every execution path can be very time consuming. Did I hear someone say small Classes please ?
Trans SAT.
Make sure teh profile you use isnt aggregating, and measure the blocks you are interested.
Now wade you way through the trace.
https://help.sap.com/doc/saphelp_ewm93/9.3/en-US/4e/c3e66b6e391014adc9fffe4e204223/content.htm?no_cache=true
Have fun :)
The call hierarchy displays also works for programs and function modules.
In my S/4HANA system, for VA01, it displays:
Clicking the hierarchy of function module CJWI_INIT displays:
I get exactly the same result by calling the function module RS_CALL_HIERARCHY this way:
The parameter OBJECT_TYPE may have these values:
P : program
FF : function module
The "call graph" is not maintained anymore since at least Basis 4.6, and it doesn't work for classes and methods.
But the tool is buggy: in some cases, a function module containing a PERFORM at the first line, it may not be displayed, whatever the call graph is launched from SE93 or directly from RS_CALL_HIERARCHY.

How do I get the common navigator contents?

it sounds like the entire contents of the Package Explorer view is exposed via the Common Navigator Framework.
How can I access this data though? I want to see the names of all the projects, files, and methods within. The closest I've gotten is:
INavigatorContentService n = NavigatorContentServiceFactory.INSTANCE.createContentService(SampleView.ID);
ITreeContentProvider tcp = n.createCommonContentProvider();
Object[] els = tcp.getElements(new Object());
but els is empty, probably because I have no idea what to pass into getElements.
Some interesting debugging: when I use the debugger to dive into the getElements call, it looks like findRootContentExtensions finds a bunch of NavigatorContentDescriptor's which look promising, but then they are not returned because they fail the isActive and isRootExtension checks. It then goes on to try to find other things to return, but it takes into account the object I pass in, and proceeds to not work. I haven't a clue what's going on.
All the documentation I've found focuses on adding a new view using the CNF, but not looking at the workspace's existing contents. Is there any good documentation for this? Thanks!

custom error pages for IBM Domino iNotes

we're currently customizing iNotes for a customer (platform currently is Domino 9). We almost reached our goals, but one thing that's on our todo list I can't really figure out: they want us to also customize any possible error pages; see the following example screenshot:
This and other similar pages seem to come from the central Forms9.nsf which I'd love to leave as it is. We so far tried domcfg.nsf mappings, but as this is an iNotes internal error it obviously can't work; I also tried to figure out a way to put seomething into our customized Forms9_x.nsf but without any hint this is too abstract for me.
So my questions are:
has anyone ever done this?
what options do we have (apart from "hacking" Forms9.nsf)?
Many thanks in advance...
Update:
After continuing to play with domcfg mappings I suddenly saw a first result; not sure what's the difference to the first attempts, though; maybe moving the error form to Forms9_x.nsf did the trick? I'll keep investigating and post an answer if I can find one...
Alright, this has been an afternoon of wild guessing and hacking along, but finally I think I found it:
first of all, my playing around with domcfg mappings didn't have to do with solving the problem; instead, I just by chance had put my error page form into my Forms9_x.nsf and named it $$ReturnGeneralError (that's simply the name used in Forms9.nsf...; I completely had forgotton about those 4 pre-defined form names back from Domino 5 times).
What did not work was the old method of simply including a text file named MessageString to display the exact error message returned from the server; obviously iNotes is handling those error strings differently.
After a few hours of testing, and comparing codes between the standard iNotes error page and mine I finally found it: include some iNotes specific computed text into the page, in my case that is
#{{MessageString}; html}
See this document for some details (last row in the table)
Hopefully this can help someone else as well...

Asynch GUI updates in Smalltalk

I wondered if anybody could help me with a technique to address the following problem in Smalltalk. Specifically Cincoms Visualworks.
I would like to code a simple GUI that has three fields and processes them as follows:
The first field inputs a number (5 say).
The second field simply displays twice the first field (so it displays 10 in this example)
Now, the interesting bit... the third field displays a value from a completely different class (let's call it class X). However, the value must be displayed on the GUI whenever that value in the class X changes - it mustn't wait for a key press from an update button. The value in class X could be sourced from (say) the workspace.
I though I could do this via aspect adaptors but I can’t seem to get the 'third field value' to update asynchronously.
Any techniques, hints or tips will be most warmly welcomed - (especially code snippets!!).
Thanks
Kevin
I've sorted this myself. After trying the dependency mechanism (works fine - but simply not needed), looking at announcements (thanks James at Cincom - personal communication) I found that all I needed to do was to simply create a method and send it a message with a parameter (my value) that method then simply updated the value holder (i.e. the aspect of the GUI field) with the "value:" message. The more I look into Smalltalk the more I like it!