Check if Glib::RefPtr<Glib::VariantDict> class is empty or not - c++

I was wondering if there is a method such as variantDict.empty() or variantDict.size(). I looked it up from this website and couldn't find anything. https://developer.gnome.org/glibmm/stable/classGlib_1_1VariantDict.html#a867a56baa952c4f98ecf21b01d3d00c3
If someone knows a way of checking if the variantDict is empty or not, please kindly help me. Thanks!

Related

Query not responding to order_by

I'm trying to order_by a query but i cannot seem to accomplish it, any help would be appreciated
users = User.objects.filter(Q(groups__name=group)).distinct()
This is the starting query i have tried many ways to make this work with the order_by method. But cant seem to get it working i am trying to order the query by the first_name in descending order.
.order_by('-first_name'.desc())
Something like this?
I get an error 'str' object has no attribute 'desc'
I have tried to look this up but cant see it being produced in the context that i am using it so i cant relate to the answers
-- Edit --
i have had some progress, Names are changing places but i cant seem to match a pattern, So i am thinking that (Q(groups__name=group)) could be the cause of it but i have no idea what this actually does, Can anyone explain this to me? thanks
use
.order_by('-first_name')
instead of
.order_by('-first_name'.desc())
- stands for descending already. otherwise you are trying to call a method on a string instead of QuerySet object

Modify List View Query of Helpdesk module

I am using vTiger 6.4 and trying to modify list view query of help desk module.
I have tried by modifying the function getListQuery() from \include\utils\ListViewUtils.php but no effect if i changed anything from it. If anyone knows the file path to modify the where condition then please help me.
Thanks in advance!
modules\Vtiger\models\ListView.php
change below function $listQuery query
getListViewEntries

How to show a legend in QwtPlot3D?

I am working with QwtPlot3D now and I need to show a legend, i.e. something like this:
But I don't know how, and I can't find a suitable tutorial, or examples on the internet. Can anyone help me?
http://qwtplot3d.sourceforge.net/web/doxygen/classQwt3D_1_1Plot3D-members.html
In its list of all members for Plot3D, it lists:
void showColorLegend (bool show)
It that doesn't work, you probably will need to create an instance of ColorLegend and make sure it has the elements you want it to show.
http://qwtplot3d.sourceforge.net/web/doxygen/classQwt3D_1_1ColorLegend.html
Hope that helps.

What does IUrlHistoryStg::BindToObject Method do?

I'm looking for a way to access the address bar search so that i can append some personnal url at the end of the current list, and i found 'IUrlHistoryStg::BindToObject' but there is no documention linked to it. Anyone knows what this method does ?
On msdn: http://msdn.microsoft.com/en-us/library/aa767718%28VS.85%29.aspx
It's not implemented, so it doesn't do anything. It was a bad idea that didn't get removed in time to not have it be in the SDK.
Use IShellFolder::BindToObject() instead.

How to set a template for a new issue in Redmine?

The goal is to make users be more specific when reporting a bug.
Ususally I get a messy report "It doesn't work, please help ASAP!" from a user, so I keep asking the same questions each time -- "The why, the who-what-when, the where, and the how..."
Instead, I want to set a template for a new issue, something like this:
What page did you go? What login did you use?
What did you see?
What did you expect to see?
Why do you think this is a bug?
or whatever.
Is it possible?
This plugin would be very helpful, in your case,
Issue Templates- http://www.redmine.org/plugins/issue_templates
here is a patch for templating issue descriptions. anything beyond that is still underway, and is relevant to the issue mentioned above.
http://www.redmine.org/issues/2931
The link below says that you can for the last year or so:
http://www.redmine.org/issues/1138
But I haven't yet found a description of how this functionality is used. I guess I'll have to slog through some code to find out.
Maybe a possible workaround is to have an issue to use as a template.
Create an issue like this:
name: Bug template
description:
What page did you go?
What login did you use?
What did you see?
What did you expect to see?
Why do you think this is a bug?
Then you can duplicate it each time you need a real issue.
The limit is with issues with subtasks. If you duplicate the parent issue you don't get the subtasks duplicated as well.