I read here that the most common browsers will show the 12/24-hour format for the input time field according to the system settings.
Does that mean there is no way to force either of the two formats?
Related
The encoding/json exposes a forgiving parser. Every not present property is simply set to its default value. Is there a better way to make a field required than using bulky switch statments and check every field for its default value? Another problem is that not all default types are nil. Is there another way to distinguish between than a not set field and e.g. 0 other than using pointers to be able to check against nil?
You may look at what there is available to implement
so-called "JSON schema validation".
You may start with this search
which yields github.com/juju/gojsonschema among others;
while I have no idea about its quality, it's used as part of
Ubuntu's Juju cloud orchestration solution so I'd expect it
to be battle tested. Still, caveat emptor.
I need to store HTML data in a MySQL database. I read about this and found that the best method is to use NVARCHAR or VARCHAR. Furthermore I'd like to compress the input to make it less space consuming. I use PHP's gzdeflate() function for deflating the HTML input, but in this case what MySQL data type should I use?
EDIT: Since I need to store quite big HTML sources I decided to go with the TEXT data type but the question: Is MySQL's TEXT field compatible with a deflated HTML string?
Use BLOB type instead of TEXT to use it for binary data.
I'm trying to find a standard (or, at least, not completely obscure) binary data format with which to represent an X/Y/Z+R/G/B point cloud, with the added requirement that I need to have some additional metadata attached to each point. Specifically, I need to attach zero or more "source" attributes, each of which is an integer, to each point.
Is there an existing binary data format which is well-suited to this? Or, perhaps, would it be wiser for me to go with two separate data files, where the metadata just refers to the points in the cloud by their index into the full list of points?
From what I can tell, the PLY format allows arbitrary length lists of attributes attached to each element and can have either ASCII or "binary" format:
http://www.mathworks.com/matlabcentral/fx_files/5459/1/content/ply.htm
As far as I know, PCD only allows a fixed number of fields:
http://pointclouds.org/documentation/tutorials/pcd_file_format.php
The app retrieves audio tracks and uses a service to get the length of the track, in hh::mm:ss format.
since it's formatted as time, but it's not an actual valid time value, I need some sortable representation of the data.
What is your recommendation?
How can it be sorted/searched/filtered?
thanks
Bring the formatted value to an int-Value. So: 00h 01m 30s => 90s
Now you can sort it, search and filter without limitation!
Well, the answer is : using the time dataType...
it's an actual time representation field.
I'm working on developing a series of reports. These reports require various columns to be formatted for numbers, currency, percentages, etc etc.
Typically to accomplish this I use an expression, something like:
=FormatPercent(Fields!NewItems.Value,2)
This works just fine. I've just recently become aware of a Format property on the text box that takes in a format string such as p2 for the example above.
Are there specific cases for using the expression over the property? The property is slightly more cryptic, requiring the dev to know the valid format strings, but it's also faster to simply enter p2 for a group of text boxes rather than going into the expression of each one individually.
Use the Format property whenever you can. This will have the best support for export formats, such as Excel.
If you use an expression, as in your example, then the value being exported will really be a string, and Excel will need to parse it to get back the original value. If you use the format property, then the original numeric value will go to Excel with formatting instructions. Then the user can choose to alter the format as needed, such as changing the rounding.
The expressions are much more flexible so it isn't hard to come up with formats that can be handled by expression and not with the Format property. So there are times that using an expression is required.