VS 2013 Watch Window- No Automatic Refreshing - c++

I have an std::stack member, which holds pointers to a class with the following members:
std::vector<char> symbols;
size_t index;
I would like to watch the contents of symbols, which is at the top of the stack. Furthermore, I want to view ten of the characters, starting from index.
Therefore, I use the following expression:
&this->the_stack.top()->symbols.operator[](this->the_stack.top()->index), 10
However, each time I advance to the next break point, it seems my expression invalidates, which requires me to click the refresh button, along with another click to expand the result of the expression.
I followed these instructions to no avail. Is there any other method to enable automatic refreshing of the watch window?
Edit: I've discovered that VS allows to add the ac format specifier, but that doesn't seem to work for C++.

Related

Is there a way to get scrollstate from Lazyrow

I have made a LazyRow that i now want to be able to get the scrollposition from. What i understand Scrollablerow has been deprecated. (correct me if im wrong) The thing is that i cant make a scrollablerow so i thought lets make a lazy one then. but i have no clue how to get scrollposition from the lazyrow. i know how to get index but not position if that eaven exists. here is what i have tried.
val scrollState = rememberScrollState()
LazyRow(scrollState = scrollstate){
}
For LazyScrollers, there are separate LazyStates.
I think there's just one, in fact, i.e. rememberLazyListState()
Pass that as the scroll state to the row and then you can access all kinds of info. For example, you could get the index of the first visible item, as well as its offset. There are direct properties for this stuff in the object returned by the above initialisation. You can also perform some more complex operations using the lazyListState.layoutInfo property that you get.
Also, ScrollableRow may be deprecated as a #Composable, but it is just refactored, a bit. Now, you can use the horozontalScroll() and verticalScroll() Modifiers, both of which accept a scrollState parameter, which expects the same object as the one you've created in the question.
Usually, you'd use LazyScrollers since they're not tough to implement and also are super-performant, but the general idea is that they are used with large datasets whereas non-lazy scrollers are okay for small sized lists and stuff. This is because the lazy ones cache only a small fraction of the entire list, making your UI peformant, which is not something regular scrollers do, and not a problem for small datasets.
They're like equivalents of RecyclerView from the View System

Django - can I sotre and run code from database?

I build program, when in one part I have some ranking, and I would like to give users option to customize it.
In my code I have a function that gets objects and returnes them packed with points and position in ranking (for now it calculates the arithmetic mean of some object's values).
My question is is it possible to give e.g. admin chance to write this function via admin panel and use it, so if he would like to one day use harmonic mean he could without changing source code?
Yes, you could just store a string in the database and exec() it with suitable arguments...
However, you'll have to be careful – Python code can practically never be sandboxed perfectly. In the event that you accept any arbitrary Python code for this, and someone with nefarious intents gets to your admin panel to change the expression, they can do practically anything.
In other words, don't use raw Python for the code you store.

Member List / Auto Correct in Visual Studio 2019 C++ strange default behavior

The following 'Auto Correct' issue occurs when typing e.g. std::cout <<.
After typing std::cout and a space this automatically gets corrected to std::count, which is the best match in the list.
I cannot find any setting to disable this 'feature'.
Update: Researching further, I find
Text Editor->C/C++->Advanced->Intellisense->Member List Filter Mode is the relevant setting. Default is "Fuzzy" and this makes count a match for cout. Setting to "Smart" removes this match.
Still I wonder why pressing Space "commits the member list". There are settings for chars which commit, but Space is not mentioned. I would be fine with Tab, but if I just type things (with spaces) I don't want any messing about.
I like the "fuzzy" matching in principle to get an overview, but I hate the auto-commit.
The relevant setting is this one found in Tools->Options->Text Editor->C/C++->Advanced->Intellisense
very aptly named - as per usual! The funny part is that the 'Aggressive Member List' is way less aggressive wrt. auto-correcting
Setting this to True leads to the desired effect:
Only Tab 'commits', i.e. inserts the (possibly inadvertently) selected member. Typing is not affected otherwise!
link of interest: https://developercommunity.visualstudio.com/idea/415157/not-possible-to-disable-c-autocomplete.html

How to see in microsoft dynamics navision 2009 number of table

I am using microsoft dynamics navision 2009. And I am using code unit. But if I press f5 on a function, for example this:
lRecStatus.SETRANGE("Change Status",lRecStatus."Change Status"::Released);
So I press f5 on: lRecStatus and then I hit f5 and then I see this:
See image. But how to know witch table it is then?
Thank you
You'll find all of the variable decelerations in one of two places, global or local, this includes the reference to the table.
From the C/AL Editor you can access these under the view menu (Beeld for you I think).
C/AL Globals will be available for the whole object
This will open directly to the variables tab, and you can see the type and subtype there.
C/AL Locals will be available for just the function, so you will want to be in the same procedure for the variable you are looking for.
There are three places a local variable being used can be found.
Parameters: These are passed to and from the function
Return Value: this is a basic data type used to return from the function
Variables: this are variables local in scope to that specific
function

Putting Controls at ToolBar- Stuck

I have been staring at this documentation for 5 hours now. I simply cant connect the steps. If you guys can enlighten me of the stuff.
Here is the site:
http://msdn.microsoft.com/EN-US/library/bb983718(VS.110).aspx
So my problem are the following:
-at number 5, it asked me to "Set these parameters as follows:", it didnt even mention anything about where? Where to implement the constructor, and why are we using CMFCToolbarComboBoxButton? when it already asked me at step 4 to derive a clas called CFindComboButton. Shouldnt I be making a contstructor for that one instead?
-at number 4(sorry about the non organized numbering of problems), what I did is use the add class (not the class wizard), and then I picked MFC Class. I then enter the supposedly CFindComboButton and Base class as CMFCToolBarComboBoxButton. Did I do something wrong on this one? Do I have to do anything for the ID ID_EDIT_FIND_COMBO?
-When I register the ID_EDIT_FIND_COMBO at the String Table, I dont exactly know what I did. Did I just register an id for future implementation? or is it something else?
-So I cant do step 5, I skipped to step 6. All it ask me is to look for the CreateCombo method athe the override section of properties at CFindComboButton. Well I can only find 3 override. None of them are CreateCombo method. Well from there, you can tell that I'm lost.
I'm a noob at mfc so you might wanna take that in consideration.
Even though your question is a bit jump-led up, let me try and answer so that it works for you.
Create two class - one derived from CComboBox (call it CFindComboBox) and another from CMFCToolBarComboBoxButton (call it CFindComboBoxButton). First class will implement the Combobox that will be shown when you click the drop down button in the toolbar. This drop down button is implemented by CFindComboBoxButton. Hope this is clear.
Now define the constructor for the CFindComboBoxButton as CFindComboBoxButton(UNIT nID, int nImage, DWORD dwStyles) using three parameters as explained below:
Command ID of the button which will be ID_EDIT_FIND_COMBO (or anything you want to define it as). This will get defined in the String Table. Just add a new entry in String Table with ID_EDIT_FIND_COMBO as ID and a placeholder string. Don't omit the string value else the ID will not get defined. The string value can be anything as it wont be used anywhere.
Second parameter will just be a call to CCommandManager::GetCmdImage(ID_EDIT_FIND). This will return the default image used to show the drop down for combobox. In case you want to use your own custom image you can create one and instead pass the ID of that.
Third parameter is the styles you want to use. They are defined at http://msdn.microsoft.com/EN-US/library/7h63bxbe(v=vs.110).aspx but you can use the default value (CBS_DROPDOWNLIST) to start with.
Override the CreateCombo method of CMFCToolBarComboBoxButton and add its implementation to CFindComboBoxButton. In this method create and return a pointer to CFindComboBox (CComboBox derived class).
I hope this clears all the confusion and you should be on your way to have a custom Combobox embedded inside a toolbar.
take a look at the VisualStudioDemo Sample:
http://msdn.microsoft.com/en-us/library/bb983983%28v=vs.90%29.aspx
you can find the CFindComboButton implementation there