Challenge: How to do Title case with only Upper and Lower? - uppercase

Acumatica doesn't have a Title function... so I have a challenging question:
How can we create a Title function when there is only Upper and Lower function?
Below are the text functions currently available in Acumatica.

Related

Gtk TreeView CellRendererProgress, use float values like 99.9?

Its value property is a type of integer. I could not find what its range is, but it seems it is 0 to 100. So, if I set a value like 50, it displays a half-full progress bar. But what if I want to display fractional percentages like "99.9"? Does CellRendererProgress have something like fractional mode? Or is there a different renderer that can take fractional values?
I did a quick review of the "CellRendererProgress" widget by reviewing the GTK source code for the widget and it indeed expects an integer value from zero to one hundred. It does not allow for a fraction as does a regular progress bar. Technically, the range for a progress bar widget is from zero to one, but the "fraction" element is a "double" so a fraction of ".999" (99.9%) would work with it. If you are keen on creating your own custom cell renderer that contains a progress bar in lieu of using the "CellRenderProgress" widget, I did a bit of searching on the web and found this link.
"https://blogs.igalia.com/csaavedra/documents/treeview-tutorial/sec-custom-cell-renderers.html"
You might be able to base a custom cell renderer widget with an embedded progress bar on this example. Bear in mind, this code was written for GTK2, so some tweaking would need to be done.
Regards.

Using color codes in list component in ireport designer [duplicate]

This question already has answers here:
Formatting field data color based on condition
(3 answers)
Closed 4 years ago.
I want to display a list of items ordered by their sales amount. I want to use some color code for displaying high, medium and low with actual values. i.e. each item in list will contain the no, item name, color code(in a square) and sales amount. Is this possible in iReport designer? Also I want to apply a vertical scroll bar to my list. How both this can be achieved in iReport designer.
Thank you.
what I understand from above your question, I think you need to display different color based on high, medium, etc. with sales amount.
By applying Conditional Styles, you can able to get your requirement
Formatting field data color based on condition
For example, if salesamount is between X and Y, you can apply a specific style using the color you want.
conditional style reference
Hope this helps you.

Star rating in Matlab GUI

Is there a way to add a rating button to a matlab GUI?
something like that
http://www.fyneworks.com/jquery/star-rating/
AFAIK there isn't a built in UIControl that provides this functionality. The closest control that I can think of is slider. Specify the MIN, MAX, and step size and the user will be bound to forced to select one of a few specific values.
Other options integrating a JAVA component into your GUI
http://blog.noblemaster.com/2010/08/31/star-rating-panel-for-java-swing/
http://code.google.com/p/starrating/
Or you can come up with a clever way to do it in matlab using a collection of radiobuttons and images.
I ended up writing my own rating system
http://www.mathworks.com/matlabcentral/fileexchange/41997-star-rating

How to dynamically add edit boxes in MATLAB GUI?

I use the inputdlg function to display a dialog box in which the user writes in several edit boxes. The number of boxes depends on the value of a variable, so I can have 3 ou 11 boxes but I figured out how to update the number of boxes in the dialog box according to the value of this variable.
Now I want to do the same thing with a GUI (and not a simple dialog box) because I would like to add some features in it (like a static text) by using uicontrol. (I'm forced to do that because it's impossible to extract the handle of the dialog box displayed by inputdlg). When you do it with GUIDE, you have to specify how many boxes you have but I can't give a fixed number of boxes, it's variable.
To sum up, I would like to dynamically increase the number of edit boxes in a GUI. How can I do that?
Suppose you want to use uicontrol.
The help is very comprehensive.
Your best bet is to have a generic function that you can call with the necessary parameters to define the object you wish to create.
Something along the lines of this:
function CreateEditBox ( various parameters/necessary handles )
set( objectHandle, 'Property', value )
% and more for whatever it is you need to define.
end

Open Graph number aggregation doesn't show decimal places for float

I'm trying to create an aggregation for my open graph action using the number layout. It needs to have two decimal places. My object, 'location', has property 'rtw' of type Float.
In the create aggregation screen in the number field I have {location.rtw | currency} which should format the float to 2 decimal places according to this document: https://developers.facebook.com/docs/opengraph/template/
However it seems to round it instead of showing decimal places, so my float of 1.54 becomes 2.
Am I doing something wrong here?
The Open Graph offers a choice of Layout Styles for aggregations:
The Open Graph Layout Style called "Number" - the layout you have chosen - always display the aggregation in its headline as an integer. This is by default and can't be changed. It appears to be an aesthetics-based choice on Facebook's part.
The headline aggregation can be a sum, min or max value, but even if the individual values are of type float the aggregation will be of type integer.
See this screenshot example, taken from the Layout style section of the Define Aggregations page on Facebook Developer. The sub-items that can be displayed as part of your aggregation display float values but the Headline number displays an integer:
Here, the total distance run 82.42 (45.06 + 25.56 + 11.8) is converted to the integer 82 in the headline sum, although each individual distance run is a float.
Net, if a developer chooses the Number Layout Style, he has to make sure that the aggregation makes sense in integer form.
There is the option to add a caption line to the aggregation which can contain a float, e.g "ran 82.42 miles in 10 hours".
The individual posts you make with your app can display a float in its headline. E.g. "just ran 25.56 miles in 3 hours".
You can explore the other Open Graph Aggregation layout styles if it is important for you to display a float in the headline. For example, the Map Layout supposedly supports displaying a float in its headline (here displaying a max value):
If the property name is rtw you should only write:
{rtw|currency}
It would be nice to have some more number formatting though. The default display of floats changed a few weeks ago as well. It used to round automatically, but now shows 2 decimals.
My movie rating app used to show 3/5 stars or 2.5/5 stars, but now shows 3.00/5 stars or 2.50/5 stars.