JS/CSS Currency formatting - ISO Code left, Value to the right - css

I am receiving currency as a string from an API, and it looks like this : "USD 10,000.00", I can have "USD 10.00" etc.. What I want to accomplish is to align the currency ISO code to the left of my table, and the value to the right - not the column right, but the longest string right, as shown in the example below.
Image of the desired solution
The table flexes so that all columns are the same size, and that is why I need this functionality. My thoughts for now are that the total sum will always be the widest element and we need to get it's width, but since my framework restricts onload() methods, I can't wait for the total element to render, thus giving me 0 for offsetWidth when I load the table for the first time. Any ideas, thoughts?

You could split the formatted currency into two parts with a regex, and then use two columns to display the formatted amount, with text in the currency code column left justified, and text in the numbers column right justified.

Related

Is it possible to sort/group images create dates in a csv based on whether the following picture time is within 2 minutes of the previous?

The image has the before spreadsheet with the dark background and the white spreadsheet is what I need as an end product to group the images into subjectsI’m working with camera trap images that I want to have sorted into events, or the times when one individual is being detected in front of the camera. My csv currently has columns with the image ID, the size of the image, and the createdate or time stamp. I want to have any picture occurring within two minutes of the previous to be grouped together as an assumption of that being the same individual animal so it will only be identified once. In the csv each image ID would need to be present in a single cell going horizontal across the spreadsheet with each row representing an event.
I thought there may be a way to do this using the package lubridate, but I have not found anything that has pushed me in the right direction.
Any ideas?
It could be easy to add a new column in with the Group number.
Sort the images by date and put first one Group = 1
then
if ( date [row]-date[row-1] > 2 min ) group[row]= groupe[row-1]+1
Later you can convert that values to numbers and use them to rename the images or whatever you want.

Column separator in qualtrics

I'm making a survey in Qualtrics with a matrix table. I want to have six options across the top, with one of them separated from the rest by a vertical line (or alternatively, more white space). How can I do this? Concretely it would look like
(Hate) (Don't like) (Ambivalent) (like) (love) | (Don't know)
across the top, with the column separator extending down the matrix table.
Do a web search on: Qualtrics Add Vertical Line Before Last Matrix Column

PHPExcel: how to get hidden cell values / Scientific Number in Number?

In PHPExcel is there any format available to get proper reading of the order item value as shown in picture.
I read whole the document but not find any solution for this problem.
For the date filled also if the data is shown ###### like way then how to get that as well?
In MS Excel, numbers that are larger than a certain size will be shown in scientific format (e.g. 1.40E+15) unless you set a format mask for that cell which says otherwise. The solution is to set an appropriate format mask, or to set the value as a string value.
In MS Excel, if a string value is wider than the column size, then it will be shown as ######. The solution is to increase the column size.
EDIT
I can't tell you what the best column size is? That all depends on your data.... but you can either set columns to a fixed size using:
$objPHPExcel->getActiveSheet()
->getColumnDimension('D')
->setWidth(32);
or set a column to autocalculate the width
$objPHPExcel->getActiveSheet()
->getColumnDimension('D')
->setAutoSize(true);
Exactly as described in the PHPExcel docs
Note that we do spend time and effort writing this documentation to try and answer your questions: it is worth reading.

Dynamically display image in a Sharepoint 2010 list

I want to display image dynamically in a list. I have two columns in a list. The first column contains some numerical values and other contains smiley icon. My requirement is, if number in first column is greater than 50, I want happy smiley to be appear in a second column in a list, and sad smiley for less than 50 number. Currently I use hyperlink column to display image in a list. And I am adding image manualy.
I am looking forward, if it is possible to automatically display image based on first column number. Something like calculated columns. Lets say,
HyperLink/Picture Formula:
column =IF([someNumer]>50, "href = c:\Test\happySmiley.ico", "href= c:\Test\happySad.ico" )
I was wondering if we could do something like this, or any other suggestion is appreciated..
You are looking for KPI indicators.
You can also find great overview here:
How to create a SharePoint KPI column
And also check similar question on SPSE:
Make all KPI Status Icons in diamond shape

Issue of alignment of string in textarea in Flex 3.0

I need to display a long string in a TextArea in the form of two columns. Say 20 characters of the string in left side and then some space and then 20 character on right side of TextArea. At next line again I am doing same thing till my string is complete.
But what is happening is like at right column all rows are not aligned exactly. This is happening because each character has different pixel width so alignment of right column depends on character printed on left column. if on left column characters are like 'iiii' then second column row starts a bit early in TextArea and if on left column, characters are like 'MMMMMM' then second column row starts a bit late.
I am using <textFormat> tag for text formatting into this string.
Try setting the fontFamily of TextArea to Courier New.
fontFamily="Courier New"

Resources