error Arabic sentence for words are reversed on datatables pdfhtml5 with laravel8 - laravel-8

this example for errorenter image description here 'customize' =>"function(doc) {
margin: [ 0, 0, 0, 5 ],
} );
}",

You can solve it by using this code example
text:'الخير صباح'.split(' ').reverse().join(' '),

Related

Get ALL exif and metadata from image

I'm using ImagePicker from Expo to import an image from the camera roll. I then want to display select exif and metadata from the image along with the photo. That works OK:
const pickImage = async () => {
let result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.All,
allowsEditing: true,
aspect: [4, 3],
quality: 1,
exif: true,
});
console.log(result.exif);
The output I get is:
Object {
"ApertureValue": 6,
"BodySerialNumber": "1234********",
"ColorSpace": 65535,
"CustomRendered": 0,
"DateTimeDigitized": "2021:01:21 16:23:06",
"DateTimeOriginal": "2021:01:21 16:23:06",
"ExifVersion": Array [
2,
3,
1,
],
"ExposureBiasValue": 0,
"ExposureMode": 1,
"ExposureProgram": 1,
"ExposureTime": 0.005,
"FNumber": 8,
"Flash": 16,
"FocalLength": 34,
"FocalPlaneResolutionUnit": 3,
"FocalPlaneXResolution": 1866.6666564941406,
"FocalPlaneYResolution": 1866.6666564941406,
"ISOSpeedRatings": Array [
800,
],
"LensModel": "EF16-35mm f/2.8L USM",
"LensSerialNumber": "0000000000",
"LensSpecification": Array [
16,
35,
0,
0,
],
"MaxApertureValue": 3,
"MeteringMode": 5,
"Orientation": 1,
"PixelXDimension": 1000,
"PixelYDimension": 667,
"RecommendedExposureIndex": 800,
"SceneCaptureType": 0,
"SensitivityType": 2,
"ShutterSpeedValue": 7.643856,
"SubsecTime": "28",
"SubsecTimeDigitized": "28",
"SubsecTimeOriginal": "28",
"WhiteBalance": 1,
}
While the actual exif descriptions are different from the same image viewed in Photoshop>File>File Info, that's not a major problem.
The issue is that there is all sorts of metadata that is not exif that I want to access. For example, while I can get the type of lens used, I cant get the type of camera used without this metadata:
<tiff:Model>Canon EOS 5D Mark IV</tiff:Model>
which is not exif, it's tiff metadata.
Other metadata I would like to access are things like the camera owners name (if they have provided that info) and the approximate focus distance. Or (while there are privacy issues in some cases) optional inclusion of gps location data.
All this is in the image metadata, just not exif.
How to I access ALL metadata in an image, or at least tiff as well as exif, in an Expo managed react native project?

bigquery nested object : No such field

I have a table with this schema :
I'm trying to upload some data from Google Coud Storage using the python client. The file is JSON newline delimited. Most of my lines don't have the field "passenger_origin.accuracy" but when the filed is present I have the following error :
Error while reading
data, error message: JSON parsing error in row starting at position
2122510: No such field: driver_origin.accuracy. (error code: invalid)
Error while reading
data, error message: JSON parsing error in row starting at position
2126317: No such field: passenger_origin.accuracy. (error code:
invalid)
Example of an invalid row :
{
"id": 1479443,
"is_obsolete": 0,
"seat_count": 1,
"is_ticket_checked": 0,
"score": 0.3709318902,
"is_multimodal": 0,
"fake_paths": 0,
"passenger_origin": {
"id": 2204,
"poi_uuid": "15b4e52c-7c58-442c-98df-1eb06079f6bb",
"user_id": 1987,
"accuracy": 250.0,
"disabled": 0,
"last_update": "2017-03-10T15:15:39",
"created": "2016-02-05T17:06:26",
"modified_by_user": 1,
"is_recurrent": 0,
"source": 1,
"hidden_by_user": 0,
"kind": 2,
},
"driver_origin": {
"id": 412491,
"poi_uuid": "47e90b6d-e178-4e02-9f02-f4ea5f8beaa1",
"user_id": 71471,
"disabled": 0,
"last_update": "2017-11-02T10:09:09",
"created": "2017-11-02T10:09:09",
"modified_by_user": 0,
"is_recurrent": 0,
"source": 1,
"hidden_by_user": 0,
"kind": 2,
},
"passenger_destination": {
"id": 2203,
"poi_uuid": "c531c3ca-47f0-4003-8098-1272fee8d018",
"user_id": 1987,
"accuracy": 250.0,
"disabled": 0,
"last_update": "2017-03-10T15:12:42",
"created": "2016-02-05T17:06:19",
"modified_by_user": 1,
"is_recurrent": 0,
"source": 1,
"hidden_by_user": 0,
"kind": 1,
}
}
The table is created before the upload of the data and is not modified since. I don't understand why the upload is failing on theses fields ? Do the RECORD fields have to be REPEATED ?
To ignore the fields that aren't present in the schema, use a combination of:
configuration.load.ignoreUnknownValues
configuration.load.maxBadRecords
Setting the first to true and the second to some arbitrarily-high number, e.g. 100000, will enable the load to succeed even if there are extra fields.
The problem was configuration.load.autodetect was set to True. I set it to False and the problem was fix

Datatable component not aligned properly

I'm using a simple table in conjunction with datatable.js.
If I have 6 or 7 columns no problem. The search and paginator align correctly, but with 3 or 4 columns it shows in three columns.
In https://datatables.net/examples/basic_init/dom.html
show how to properly configure this, but I'm using thymeleaf and complains about the syntax
UPDATE 1
I have posted my question in:
https://datatables.net/forums/discussion/45926/dom-in-thymeleaf-html-pages
and this is that post:
Trying to add the code in: https://datatables.net/examples/basic_init/dom.html
in a thymeleaf html page, but it complains about this code:
"dom": '<"top"i>rt<"bottom"flp><"clear">'
I tried to change " by ' and use escape characters but no way.
This script in my html page, doesnt work:
$(document).ready(function() {
$("#mensuales").DataTable({
"dom": '<"top"i>rt<"bottom"flp><"clear">',
"language": {
"url": "//cdn.datatables.net/plug-ins/1.10.15/i18n/Spanish.json"
},
"lenghtMenu": [
[5, 12, 15, 20, -1],
[5, 12, 15, 20, "Todos"]
],
"ordering": true,
stateSave: true
});
});
Allan says the code is correct, but I not be able to use in my pages.
UPDATE 2
Any suggestions?
Thanks
Try with:
<script type="text/javascript" th:inline="javascript">
/*<![CDATA[*/
$(document).ready(function() {
$("#mensuales").DataTable({
"dom": '<"top"i>rt<"bottom"flp><"clear">',
"language": {
"url": "//cdn.datatables.net/plug-ins/1.10.15/i18n/Spanish.json"
},
"lenghtMenu": [
[5, 12, 15, 20, -1],
[5, 12, 15, 20, "Todos"]
],
"ordering": true,
stateSave: true
});
});
/*]]>*/
</script>

Display number of records in a page in datatables

I need to show the Display number of records in a page by using datatables plugin.
I have included the following js files:
js/jquery.dataTables.js
js/ColVis.js
js/ColumnFilterWidgets.js
js/extras/TableTools/media/js/ZeroClipboard.js
js/media/js/jquery.dataTables.js
js/extras/TableTools/media/js/TableTools.js
and code is like:
oTable = $('#data-table').dataTable( {
"sDom": 'CT<"clear">firtlip',
"oTableTools": {
"sSwfPath": basePath+"/js/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [ {"sExtends": "csv","sFileName" : curpath+".csv","sButtonText": "Save to CSV","mColumns": "visible"} ]
},
"aaSorting": [[0, "desc"]],
"bAutoWidth":false,
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"iDisplayLength": 10,
'sPaginationType': 'full_numbers'
} );
But the select box for for selecting the number of records is not displaying.
Please guide me where is the issue.
Thanks in advance.
If you change your css then automatically solve the issue. Just change "display:none" to "display:block" for data-table_length class in css.

Sencha Touch chart - How to add label/value in line chart

I am using Sencha Touch charts 1.0.0 for my project. I would like to add values on each point in my line chart (as in image). I tried the same approach in this question for column chart, but it didn't work out.
I had the same problem with you. But i find a solution instead for that. You can add marker at each node of line and when you click on marker a popup will show detail information as you want. This's my code may help you :
-Add marker in cofig of series :
type: 'line',
title: 'Clickeds : ' + total[4] + ' ( ' + Math.round(arrInfo[4]) + '% )',
highlightCfg: { scale : 0.7 },
xField: 'Date', yField: 'Clks',
style : {
stroke: 'rgb(50, 185, 150)',
miterLimit : 3,
lineCap: 'miter',
lineWidth: 2
}
,
marker:{
type: 'image',
src: 'resources/images/square.png',
width: 24,
height: 24,
x: -12,
y: -12,
scale: 0.5,
fx: {
duration: 200
}
}
Handle event when you click on node, you add listeners to config of chart : `listeners: {
itemtap: function( series, item, event, eOpts ){
//handle your code here.
}`
Regards,
(Sorry for bad english.)