Title: Check if date column is complete and sequential and calc rolling means

Body:
Part 1:
I have a dataframe with 600,000 observations of with a date time column. I want to know if that data time column is in sequential order and if there are missing days. So does the order go 12-01-01, 12-01-02, 12-01-03 and are there missing days.

Part 2:
Ultimately I would like to calculate 4 day, 7 day, and 14 day rolling averages for wind speed. I want to make sure the days are consecutive so there are not large gaps between days when a rolling average is calculated. The data also comes from multiple buoy locations so I will want to have the rolling averages grouped by lat and lon. I mainly need help how to address calulating the rolling averages and accounting for gaps in the date column

Data

grid_data <- structure(list(time = structure(c(757386000, 757389600, 757396800,
757400400, 757404000, 757407600, 757411200, 757414800, 757418400,
757422000, 757425600, 757429200, 757432800, 757436400, 757440000,
757443600, 757447200, 757454400, 757461600, 757465200, 757468800,
757472400, 757476000, 757479600, 757483200, 757486800, 757490400,
757494000, 757497600, 757501200, 757504800, 757508400, 757512000,
757515600, 757519200, 757522800, 757526400, 757530000, 757533600,
757537200, 757540800, 757544400, 757555200, 757558800, 757562400,
757566000, 757569600, 757573200, 757576800, 757580400, 757584000,
757587600, 757591200, 757594800, 757598400, 757602000, 757605600,
757609200, 757612800, 757616400, 757620000, 757623600, 757641600,
757645200, 757648800, 757652400, 757656000, 757659600, 757663200,
757666800, 757670400, 757674000, 757677600, 757684800, 757688400,
757692000, 757695600, 757699200, 757702800, 757706400, 757710000,
757713600, 757717200, 757720800, 757724400, 757728000, 757731600,
757735200, 757738800, 757742400, 757746000, 757749600, 757753200,
757756800, 757760400, 757764000, 757767600, 757771200, 757774800,
757778400, 757782000, 757785600, 757789200, 757792800, 757803600,
757807200, 757814400, 757818000, 757821600, 757825200, 757828800,
757832400, 757836000, 757839600, 757843200, 757846800, 757850400,
757854000, 757857600, 757861200, 757864800, 757868400, 757872000,
757875600, 757879200, 757882800, 757890000, 757900800, 757904400,
757908000, 757911600, 757915200, 757918800, 757922400, 757926000,
757929600, 757933200, 757936800, 757940400, 757944000, 757947600,
757951200, 757954800, 757958400, 757962000, 757965600, 757969200,
757976400, 757980000, 757983600, 757987200, 757990800, 757994400,
757998000, 758001600, 758005200, 758008800, 758012400, 758016000,
758019600, 758023200, 758026800, 758030400, 758034000, 758037600,
758041200, 758044800, 758048400, 758052000, 758062800, 758066400,
758070000, 758077200, 758080800, 758084400, 758088000, 758091600,
758095200, 758098800, 758102400, 758106000, 758109600, 758113200,
758116800, 758120400, 758124000, 758127600, 758131200, 758134800,
758138400, 758145600, 758149200, 758152800, 758160000, 758163600,
758167200, 758170800, 758174400, 758178000, 758181600, 758185200,
758188800, 758192400, 758196000, 758199600, 758203200, 758206800,
758210400, 758214000, 758217600, 758221200, 758224800, 758228400,
758235600, 758246400, 758250000, 758253600, 758257200, 758260800,
758264400, 758268000, 758271600, 758275200, 758278800, 758282400,
758286000, 758289600, 758293200, 758296800, 758300400, 758304000,
758307600, 758311200, 758314800, 758325600, 758329200, 758336400,
758340000, 758343600, 758347200, 758350800, 758354400, 758358000,
758361600, 758365200, 758368800, 758372400, 758376000, 758379600,
758383200, 758386800, 758390400, 758394000, 758397600, 758401200,
758404800, 758408400, 758419200, 758422800, 758426400, 758430000,
758433600, 758437200, 758440800, 758444400, 758448000, 758451600,
758455200, 758458800, 758462400, 758466000, 758469600, 758473200,
758476800, 758480400, 758484000, 758487600, 758491200, 758494800,
758502000, 758505600, 758509200, 758512800, 758516400, 758520000,
758523600, 758527200, 758530800, 758534400, 758538000, 758541600,
758545200, 758548800, 758552400, 758556000, 758559600, 758563200,
758566800, 758570400, 758574000), tzone = "UTC", class = c("POSIXct",
"POSIXt")), lat = c(34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637, 34.2700004577637, 34.2700004577637, 34.2700004577637,
34.2700004577637), lon = c(-120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242, -120.449996948242, -120.449996948242,
-120.449996948242, -120.449996948242), wind_spd = c(10.3000001907349,
9.89999961853027, 9.60000038146973, 8.30000019073486, 9.5, 10,
8.39999961853027, 8.69999980926514, 9.89999961853027, 10.1999998092651,
10.6999998092651, 9.39999961853027, 10.3999996185303, 11.5, 11.8000001907349,
11.3000001907349, 10.8000001907349, 10, 10.6000003814697, 11.8999996185303,
11.1000003814697, 11.6000003814697, 9.39999961853027, 9.60000038146973,
11.1000003814697, 11.3999996185303, 11, 9.30000019073486, 10.1000003814697,
8.10000038146973, 3, 2.70000004768372, 2.09999990463257, 0.100000001490116,
0.600000023841858, 1.39999997615814, 0.800000011920929, 1.20000004768372,
1.60000002384186, 4.59999990463257, 3.59999990463257, 4.80000019073486,
6.80000019073486, 6.59999990463257, 6.19999980926514, 6.5, 7,
5.69999980926514, 5.90000009536743, 5.09999990463257, 3.59999990463257,
3.79999995231628, 5.80000019073486, 5.30000019073486, 6.09999990463257,
6.69999980926514, 4.69999980926514, 4.59999990463257, 3.40000009536743,
2.20000004768372, 1.29999995231628, 1.89999997615814, 5.59999990463257,
7.59999990463257, 7.80000019073486, 7.19999980926514, 7.90000009536743,
8.5, 8, 8, 5.90000009536743, 6.09999990463257, 8.19999980926514,
9.30000019073486, 9.10000038146973, 7.19999980926514, 9.69999980926514,
10.3000001907349, 9.5, 8.30000019073486, 10.1999998092651, 9.10000038146973,
9.5, 11.1999998092651, 10.8000001907349, 11.1999998092651, 10.8999996185303,
11.8999996185303, 12.3000001907349, 12.1999998092651, 12.1000003814697,
12.8000001907349, 13.3999996185303, 12.6999998092651, 14.8000001907349,
11.1000003814697, 13.1000003814697, 13.8999996185303, 12, 14,
13.8999996185303, 11.3999996185303, 13.1000003814697, 12.8000001907349,
13.8999996185303, 16.6000003814697, 18.1000003814697, 16.8999996185303,
15.3000001907349, 14.6000003814697, 12.8000001907349, 14.3000001907349,
14.3999996185303, 16.6000003814697, 12.3999996185303, 13.6000003814697,
14.1000003814697, 16.7000007629395, 16.5, 17, 13.1999998092651,
10.6999998092651, 15.6000003814697, 10, 10, 8.10000038146973,
7.09999990463257, 6, 4.69999980926514, 4.90000009536743, 3.29999995231628,
3.09999990463257, 0.899999976158142, 0.100000001490116, 0.600000023841858,
1.5, 2.09999990463257, 3.40000009536743, 4.30000019073486, 4.80000019073486,
5.90000009536743, 4.5, 4, 4.59999990463257, 3.70000004768372,
3.20000004768372, 5.09999990463257, 4.40000009536743, 3.20000004768372,
1.29999995231628, 0.699999988079071, 0.600000023841858, 1.10000002384186,
2.40000009536743, 3.70000004768372, 1.60000002384186, 2.09999990463257,
2.29999995231628, 1.89999997615814, 2.09999990463257, 3.29999995231628,
3.79999995231628, 4.09999990463257, 4.5, 5.90000009536743, 6,
7.80000019073486, 6.5, 8.30000019073486, 9.39999961853027, 11,
11.6999998092651, 12.3999996185303, 12.1999998092651, 11.8999996185303,
12.1999998092651, 13.8999996185303, 14.5, 13.3999996185303, 12.1999998092651,
14, 11.8999996185303, 10.5, 11, 11.1000003814697, 12.8000001907349,
11.3000001907349, 9.69999980926514, 11.3999996185303, 11, 12.3999996185303,
12.5, 13.6999998092651, 14.6000003814697, 14.1999998092651, 12.3000001907349,
13.3000001907349, 11.6000003814697, 11.8999996185303, 11.8000001907349,
9.69999980926514, 11.8000001907349, 12, 8.80000019073486, 6.69999980926514,
8.60000038146973, 3.09999990463257, 1.70000004768372, 0.400000005960464,
0.800000011920929, 1.79999995231628, 3.09999990463257, 2.29999995231628,
4, 3.09999990463257, 3.79999995231628, 5, 5.69999980926514, 4.19999980926514,
5.30000019073486, 6.30000019073486, 6.59999990463257, 6.09999990463257,
4.69999980926514, 4.80000019073486, 5, 3, 4.40000009536743, 5,
8.10000038146973, 7.09999990463257, 7.80000019073486, 6.09999990463257,
8.30000019073486, 11.1000003814697, 10.8000001907349, 10.5, 11.8999996185303,
8.30000019073486, 3.90000009536743, 4.40000009536743, 4.5, 3.09999990463257,
1.20000004768372, 3.40000009536743, 4.09999990463257, 4.59999990463257,
4.69999980926514, 3.20000004768372, 1.89999997615814, 1.10000002384186,
3.40000009536743, 3.90000009536743, 1.70000004768372, 0.200000002980232,
2.59999990463257, 3.5, 5.09999990463257, 4.69999980926514, 5.19999980926514,
7.19999980926514, 8.19999980926514, 5.40000009536743, 2.09999990463257,
2.90000009536743, 1.10000002384186, 1.5, 1.29999995231628, 2.40000009536743,
1.29999995231628, 1.5, 1.39999997615814, 3.40000009536743, 3.20000004768372,
3.20000004768372, 3.59999990463257, 0.600000023841858, 0, 2.09999990463257,
3.29999995231628, 3.79999995231628, 2.79999995231628, 4.69999980926514,
6, 5.30000019073486, 6.40000009536743, 6, 5.90000009536743, 4.90000009536743,
3.20000004768372, 2.90000009536743, 2.90000009536743, 1.60000002384186,
1.29999995231628, 2.70000004768372, 2.90000009536743, 2.79999995231628,
3.79999995231628, 3.29999995231628, 3.20000004768372)), row.names = c(NA,
-300L), class = c("tbl_df", "tbl", "data.frame"))


来源: stackexchange

问:
Network transform synchronization between players does not work

This is full code, but smth is wrong so nothing works. I have tried a few options, but it is just one thanks did not have any errors (in visual studio). Please, help to fix it.

```<code>using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using Unity.VisualScripting;
using UnityEditor;
using UnityEditor.TerrainTools;
using UnityEngine;
using UnityEngine.UIElements;

public class PlayerNetwork : NetworkBehaviour
{
    private readonly NetworkVariable<PlayerNetworkData> _netState = new(writePerm: NetworkVariableWritePermission.Owner);
    private Vector3 _posVel;
    private Vector3 _rotVel;
    private Vector3 _scaVel;

    #region Values

    [SerializeField] private float _cheapInterpolationTime = 0.1f;

    [Header("Position")]
    [SerializeField] private bool _xPos;
    [SerializeField] private bool _yPos;
    [SerializeField] private bool _zPos;
    [Header("Rotation")]
    [SerializeField] private bool _xRot;
    [SerializeField] private bool _yRot;
    [SerializeField] private bool _zRot;
    [Header("Scale")]
    [SerializeField] private bool _xSca;
    [SerializeField] private bool _ySca;
    [SerializeField] private bool _zSca;

    #endregion

    void Update()
    {
        if (IsOwner)
        {
            if (_xPos) { _netState.Value = new PlayerNetworkData() { PositionX = transform.position.x }; }
            if (_yPos) { _netState.Value = new PlayerNetworkData() { PositionY = transform.position.y }; }
            if (_zPos) { _netState.Value = new PlayerNetworkData() { PositionZ = transform.position.z }; }

            if (_xRot) { _netState.Value = new PlayerNetworkData() { RotationX = transform.rotation.eulerAngles.x }; }
            if (_yRot) { _netState.Value = new PlayerNetworkData() { RotationY = transform.rotation.eulerAngles.y }; }
            if (_zRot) { _netState.Value = new PlayerNetworkData() { RotationZ = transform.rotation.eulerAngles.z }; }

            if (_xSca) { _netState.Value = new PlayerNetworkData() { ScaleX = transform.localScale.x }; }
            if (_ySca) { _netState.Value = new PlayerNetworkData() { ScaleY = transform.localScale.y }; }
            if (_zSca) { _netState.Value = new PlayerNetworkData() { ScaleZ = transform.localScale.z }; }
        }
        else
        {
            Vector3 targetPos = new Vector3(_netState.Value.PositionX, _netState.Value.PositionY, _netState.Value.PositionZ);
            transform.position = Vector3.SmoothDamp(transform.position, targetPos, ref _posVel, _cheapInterpolationTime);

            Quaternion targetRot = new Quaternion(_netState.Value.RotationX, _netState.Value.RotationY, _netState.Value.RotationZ, 0);
            transform.rotation = Quaternion.Slerp(transform.rotation, targetRot, _cheapInterpolationTime);

            Vector3 targetSca = new Vector3(_netState.Value.ScaleX, _netState.Value.ScaleY, _netState.Value.ScaleZ);
            transform.position = Vector3.SmoothDamp(transform.localScale, targetSca, ref _scaVel, _cheapInterpolationTime);
        }
    }

    struct PlayerNetworkData : INetworkSerializable
    {
        float _xPos, _yPos, _zPos, _xRot, _yRot, _zRot, _xSca, _ySca, _zSca;

        #region Variables

        internal float PositionX
        {
            get => _xPos;
            set => _xPos = value;
        }
        internal float PositionY
        {
            get => _yPos;
            set => _yPos = value;
        }
        internal float PositionZ
        {
            get => _zPos;
            set => _zPos = value;
        }

        internal float RotationX
        {
            get => _xRot;
            set => _xRot = value;
        }
        internal float RotationY
        {
            get => _yRot;
            set => _yPos = value;
        }
        internal float RotationZ
        {
            get => _zRot;
            set => _zRot = value;
        }

        internal float ScaleX
        {
            get => _xSca;
            set => _xSca = value;
        }
        internal float ScaleY
        {
            get => _ySca;
            set => _ySca = value;
        }
        internal float ScaleZ
        {
            get => _zSca;
            set => _zSca = value;
        }

        #endregion

        public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter
        {
            serializer.SerializeValue(ref _xPos);
            serializer.SerializeValue(ref _yPos);
            serializer.SerializeValue(ref _zPos);

            serializer.SerializeValue(ref _xRot);
            serializer.SerializeValue(ref _yRot);
            serializer.SerializeValue(ref _zRot);

            serializer.SerializeValue(ref _xSca);
            serializer.SerializeValue(ref _ySca);
            serializer.SerializeValue(ref _zSca);
        }
    }
}
</code>```

I have tried to do it with more economical options, but it just does not work.
Thanks for your help.

Also I do not know why does it say that i must write more details, even though I have already writen some text.

ContentLicense: CC BY-SA 4.0

Body:
This is full code, but smth is wrong so nothing works. I have tried a few options, but it is just one thanks did not have any errors (in visual studio). Please, help to fix it.

using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using Unity.VisualScripting;
using UnityEditor;
using UnityEditor.TerrainTools;
using UnityEngine;
using UnityEngine.UIElements;

public class PlayerNetwork : NetworkBehaviour
{
    private readonly NetworkVariable<PlayerNetworkData> _netState = new(writePerm: NetworkVariableWritePermission.Owner);
    private Vector3 _posVel;
    private Vector3 _rotVel;
    private Vector3 _scaVel;

    #region Values

    [SerializeField] private float _cheapInterpolationTime = 0.1f;

    [Header("Position")]
    [SerializeField] private bool _xPos;
    [SerializeField] private bool _yPos;
    [SerializeField] private bool _zPos;
    [Header("Rotation")]
    [SerializeField] private bool _xRot;
    [SerializeField] private bool _yRot;
    [SerializeField] private bool _zRot;
    [Header("Scale")]
    [SerializeField] private bool _xSca;
    [SerializeField] private bool _ySca;
    [SerializeField] private bool _zSca;

    #endregion

    void Update()
    {
        if (IsOwner)
        {
            if (_xPos) { _netState.Value = new PlayerNetworkData() { PositionX = transform.position.x }; }
            if (_yPos) { _netState.Value = new PlayerNetworkData() { PositionY = transform.position.y }; }
            if (_zPos) { _netState.Value = new PlayerNetworkData() { PositionZ = transform.position.z }; }

            if (_xRot) { _netState.Value = new PlayerNetworkData() { RotationX = transform.rotation.eulerAngles.x }; }
            if (_yRot) { _netState.Value = new PlayerNetworkData() { RotationY = transform.rotation.eulerAngles.y }; }
            if (_zRot) { _netState.Value = new PlayerNetworkData() { RotationZ = transform.rotation.eulerAngles.z }; }

            if (_xSca) { _netState.Value = new PlayerNetworkData() { ScaleX = transform.localScale.x }; }
            if (_ySca) { _netState.Value = new PlayerNetworkData() { ScaleY = transform.localScale.y }; }
            if (_zSca) { _netState.Value = new PlayerNetworkData() { ScaleZ = transform.localScale.z }; }
        }
        else
        {
            Vector3 targetPos = new Vector3(_netState.Value.PositionX, _netState.Value.PositionY, _netState.Value.PositionZ);
            transform.position = Vector3.SmoothDamp(transform.position, targetPos, ref _posVel, _cheapInterpolationTime);

            Quaternion targetRot = new Quaternion(_netState.Value.RotationX, _netState.Value.RotationY, _netState.Value.RotationZ, 0);
            transform.rotation = Quaternion.Slerp(transform.rotation, targetRot, _cheapInterpolationTime);

            Vector3 targetSca = new Vector3(_netState.Value.ScaleX, _netState.Value.ScaleY, _netState.Value.ScaleZ);
            transform.position = Vector3.SmoothDamp(transform.localScale, targetSca, ref _scaVel, _cheapInterpolationTime);
        }
    }

    struct PlayerNetworkData : INetworkSerializable
    {
        float _xPos, _yPos, _zPos, _xRot, _yRot, _zRot, _xSca, _ySca, _zSca;

        #region Variables

        internal float PositionX
        {
            get => _xPos;
            set => _xPos = value;
        }
        internal float PositionY
        {
            get => _yPos;
            set => _yPos = value;
        }
        internal float PositionZ
        {
            get => _zPos;
            set => _zPos = value;
        }

        internal float RotationX
        {
            get => _xRot;
            set => _xRot = value;
        }
        internal float RotationY
        {
            get => _yRot;
            set => _yPos = value;
        }
        internal float RotationZ
        {
            get => _zRot;
            set => _zRot = value;
        }

        internal float ScaleX
        {
            get => _xSca;
            set => _xSca = value;
        }
        internal float ScaleY
        {
            get => _ySca;
            set => _ySca = value;
        }
        internal float ScaleZ
        {
            get => _zSca;
            set => _zSca = value;
        }

        #endregion

        public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter
        {
            serializer.SerializeValue(ref _xPos);
            serializer.SerializeValue(ref _yPos);
            serializer.SerializeValue(ref _zPos);

            serializer.SerializeValue(ref _xRot);
            serializer.SerializeValue(ref _yRot);
            serializer.SerializeValue(ref _zRot);

            serializer.SerializeValue(ref _xSca);
            serializer.SerializeValue(ref _ySca);
            serializer.SerializeValue(ref _zSca);
        }
    }
}

I have tried to do it with more economical options, but it just does not work.
Thanks for your help.

Also I do not know why does it say that i must write more details, even though I have already writen some text.


问:
Is there a way to make math calculations with two objects with the same keys efficiently?
I'm currently working on a Tennis scorer where the user inputs the information for each point and then gets saved in an object. The way I do this is whenever a set ends, a new object is created inside a global object with the information of the match at that moment, so the information for each set is cumulative. An example of a match would look like this:

```<code> "sets": {
  "set1": {
    "equipo1": {
      "breakPoints": 5,
      "breakPointsExito": 0,
      "games": 5,
      "jugador1": {
        "smashes": 0,
        "smashesExito": 5,
        "unfError": 0,
        "winners": 0,
      },
      "jugador2":  {
        "smashes": 0,
        "smashesExito": 1,
        "unfError": 0,
        "winners": 2,
      },
      "puntosOro": 0,
    },
    "equipo2": {
      "breakPoints": 3,
      "breakPointsExito": 1,
      "games": 7,
      "jugador1": Object {
        "smashes": 0,
        "smashesExito": 5,
        "unfError": 0,
        "winners": 2,
      },
      "jugador2": {
        "smashes": 0,
        "smashesExito": 2,
        "unfError": 0,
        "winners": 3,
      },
      "puntosOro": 2,
    },
  },
  "set2": {
    "equipo1": {
      "breakPoints": 8,
      "breakPointsExito": 1,
      "games": 2,
      "jugador1": Object {
        "smashes": 0,
        "smashesExito": 8,
        "unfError": 0,
        "winners": 2,
      },
      "jugador2": {
        "smashes": 0,
        "smashesExito": 3,
        "unfError": 0,
        "winners": 3,
      },
      "puntosOro": 1,
    },
    "equipo2": {
      "breakPoints": 4,
      "breakPointsExito": 2,
      "games": 2,
      "jugador1": Object {
        "smashes": 0,
        "smashesExito": 9,
        "unfError": 0,
        "winners": 2,
      },
      "jugador2": {
        "smashes": 0,
        "smashesExito": 5,
        "unfError": 0,
        "winners": 8,
      },
      "puntosOro": 2,
    },
  },
}
</code>```

Now, what I want to do is to show this information by sets, so, let's say we wanted to show the information of the 3rd set, we would have to subtract the sum of the previous sets. I was wondering if there was any way to make this efficiently since the keys of each set object are essentially the same, with only the value changing.

Right now I made it work by creating an object based on the sets results, but it's very ugly and I hope there's a way of better doing this:

```<code> if (value == 0) {
      matchFunc([
        {
          name: "Break Points",
          equipo1: infoEquipo1.breakPointsExito,
          equipo2: infoEquipo2.breakPointsExito,
        },
        {
          name: "Puntos de Oro",
          equipo1: infoEquipo1.puntosOro,
          equipo2: infoEquipo2.puntosOro,
        },
        {
          name: "Winners",
          equipo1:
            infoMatchEquipo1.jugador1.winners +
            infoMatchEquipo1.jugador2.winners,

          equipo2:
            infoMatchEquipo2.jugador1.winners +
            infoMatchEquipo2.jugador2.winners,
        },
        {
          name: "Smashes",
          equipo1:
            infoMatchEquipo1.jugador1.smashesExito +
            infoMatchEquipo1.jugador2.smashesExito,

          equipo2:
            infoMatchEquipo2.jugador1.smashesExito +
            infoMatchEquipo2.jugador2.smashesExito,
        },
        {
          name: "Unforced Errors",
          equipo1:
            infoMatchEquipo1.jugador1.unfError +
            infoMatchEquipo1.jugador2.unfError,

          equipo2:
            infoMatchEquipo2.jugador1.unfError +
            infoMatchEquipo2.jugador2.unfError,
        },
      ]);
    }
    if (value == 1) {
      matchFunc([
        {
          name: "Winners",
          equipo1:
            infoSets.set1.equipo1.jugador1.winners +
            infoSets.set1.equipo1.jugador2.winners,

          equipo2:
            infoSets.set1.equipo2.jugador1.winners +
            infoSets.set1.equipo2.jugador2.winners,
        },
        {
          name: "Smashes",
          equipo1:
            infoSets.set1.equipo1.jugador1.smashesExito +
            infoSets.set1.equipo1.jugador2.smashesExito,

          equipo2:
            infoSets.set1.equipo2.jugador1.smashesExito +
            infoSets.set1.equipo2.jugador2.smashesExito,
        },
        {
          name: "Unforced Errors",
          equipo1:
            infoSets.set1.equipo1.jugador1.unfError +
            infoSets.set1.equipo1.jugador2.unfError,

          equipo2:
            infoSets.set1.equipo2.jugador1.unfError +
            infoSets.set1.equipo2.jugador2.unfError,
        },
      ]);
    }
    if (value == 2) {
      matchFunc([
        {
          name: "Winners",
          equipo1:
            infoSets.set2.equipo1.jugador1.winners +
            infoSets.set2.equipo1.jugador2.winners -
            (infoSets.set1.equipo1.jugador1.winners +
              infoSets.set1.equipo1.jugador2.winners),

          equipo2:
            infoSets.set2.equipo2.jugador1.winners +
            infoSets.set2.equipo2.jugador2.winners -
            (infoSets.set1.equipo2.jugador1.winners +
              infoSets.set1.equipo2.jugador2.winners),
        },
        {
          name: "Smashes",
          equipo1:
            infoSets.set2.equipo1.jugador1.smashesExito +
            infoSets.set2.equipo1.jugador2.smashesExito -
            (infoSets.set1.equipo1.jugador1.smashesExito +
              infoSets.set1.equipo1.jugador2.smashesExito),

          equipo2:
            infoSets.set2.equipo2.jugador1.smashesExito +
            infoSets.set2.equipo2.jugador2.smashesExito -
            (infoSets.set1.equipo2.jugador1.smashesExito +
              infoSets.set1.equipo2.jugador2.smashesExito),
        },
        {
          name: "Unforced Errors",
          equipo1:
            infoSets.set2.equipo1.jugador1.unfError +
            infoSets.set2.equipo1.jugador2.unfError -
            (infoSets.set1.equipo1.jugador1.unfError +
              infoSets.set1.equipo1.jugador2.unfError),

          equipo2:
            infoSets.set2.equipo2.jugador1.unfError +
            infoSets.set2.equipo2.jugador2.unfError -
            (infoSets.set1.equipo2.jugador1.unfError +
              infoSets.set1.equipo2.jugador2.unfError),
        },
      ]);
    }
</code>```

I'm sorry, I know that this looks horrendous, but it's the only way i've been able to make it work. The if(value) refers to the sets, and the 0 is for the entire match.

Body:
I'm currently working on a Tennis scorer where the user inputs the information for each point and then gets saved in an object. The way I do this is whenever a set ends, a new object is created inside a global object with the information of the match at that moment, so the information for each set is cumulative. An example of a match would look like this:

 "sets": {
  "set1": {
    "equipo1": {
      "breakPoints": 5,
      "breakPointsExito": 0,
      "games": 5,
      "jugador1": {
        "smashes": 0,
        "smashesExito": 5,
        "unfError": 0,
        "winners": 0,
      },
      "jugador2":  {
        "smashes": 0,
        "smashesExito": 1,
        "unfError": 0,
        "winners": 2,
      },
      "puntosOro": 0,
    },
    "equipo2": {
      "breakPoints": 3,
      "breakPointsExito": 1,
      "games": 7,
      "jugador1": Object {
        "smashes": 0,
        "smashesExito": 5,
        "unfError": 0,
        "winners": 2,
      },
      "jugador2": {
        "smashes": 0,
        "smashesExito": 2,
        "unfError": 0,
        "winners": 3,
      },
      "puntosOro": 2,
    },
  },
  "set2": {
    "equipo1": {
      "breakPoints": 8,
      "breakPointsExito": 1,
      "games": 2,
      "jugador1": Object {
        "smashes": 0,
        "smashesExito": 8,
        "unfError": 0,
        "winners": 2,
      },
      "jugador2": {
        "smashes": 0,
        "smashesExito": 3,
        "unfError": 0,
        "winners": 3,
      },
      "puntosOro": 1,
    },
    "equipo2": {
      "breakPoints": 4,
      "breakPointsExito": 2,
      "games": 2,
      "jugador1": Object {
        "smashes": 0,
        "smashesExito": 9,
        "unfError": 0,
        "winners": 2,
      },
      "jugador2": {
        "smashes": 0,
        "smashesExito": 5,
        "unfError": 0,
        "winners": 8,
      },
      "puntosOro": 2,
    },
  },
}

Now, what I want to do is to show this information by sets, so, let's say we wanted to show the information of the 3rd set, we would have to subtract the sum of the previous sets. I was wondering if there was any way to make this efficiently since the keys of each set object are essentially the same, with only the value changing.

Right now I made it work by creating an object based on the sets results, but it's very ugly and I hope there's a way of better doing this:

 if (value == 0) {
      matchFunc([
        {
          name: "Break Points",
          equipo1: infoEquipo1.breakPointsExito,
          equipo2: infoEquipo2.breakPointsExito,
        },
        {
          name: "Puntos de Oro",
          equipo1: infoEquipo1.puntosOro,
          equipo2: infoEquipo2.puntosOro,
        },
        {
          name: "Winners",
          equipo1:
            infoMatchEquipo1.jugador1.winners +
            infoMatchEquipo1.jugador2.winners,

          equipo2:
            infoMatchEquipo2.jugador1.winners +
            infoMatchEquipo2.jugador2.winners,
        },
        {
          name: "Smashes",
          equipo1:
            infoMatchEquipo1.jugador1.smashesExito +
            infoMatchEquipo1.jugador2.smashesExito,

          equipo2:
            infoMatchEquipo2.jugador1.smashesExito +
            infoMatchEquipo2.jugador2.smashesExito,
        },
        {
          name: "Unforced Errors",
          equipo1:
            infoMatchEquipo1.jugador1.unfError +
            infoMatchEquipo1.jugador2.unfError,

          equipo2:
            infoMatchEquipo2.jugador1.unfError +
            infoMatchEquipo2.jugador2.unfError,
        },
      ]);
    }
    if (value == 1) {
      matchFunc([
        {
          name: "Winners",
          equipo1:
            infoSets.set1.equipo1.jugador1.winners +
            infoSets.set1.equipo1.jugador2.winners,

          equipo2:
            infoSets.set1.equipo2.jugador1.winners +
            infoSets.set1.equipo2.jugador2.winners,
        },
        {
          name: "Smashes",
          equipo1:
            infoSets.set1.equipo1.jugador1.smashesExito +
            infoSets.set1.equipo1.jugador2.smashesExito,

          equipo2:
            infoSets.set1.equipo2.jugador1.smashesExito +
            infoSets.set1.equipo2.jugador2.smashesExito,
        },
        {
          name: "Unforced Errors",
          equipo1:
            infoSets.set1.equipo1.jugador1.unfError +
            infoSets.set1.equipo1.jugador2.unfError,

          equipo2:
            infoSets.set1.equipo2.jugador1.unfError +
            infoSets.set1.equipo2.jugador2.unfError,
        },
      ]);
    }
    if (value == 2) {
      matchFunc([
        {
          name: "Winners",
          equipo1:
            infoSets.set2.equipo1.jugador1.winners +
            infoSets.set2.equipo1.jugador2.winners -
            (infoSets.set1.equipo1.jugador1.winners +
              infoSets.set1.equipo1.jugador2.winners),

          equipo2:
            infoSets.set2.equipo2.jugador1.winners +
            infoSets.set2.equipo2.jugador2.winners -
            (infoSets.set1.equipo2.jugador1.winners +
              infoSets.set1.equipo2.jugador2.winners),
        },
        {
          name: "Smashes",
          equipo1:
            infoSets.set2.equipo1.jugador1.smashesExito +
            infoSets.set2.equipo1.jugador2.smashesExito -
            (infoSets.set1.equipo1.jugador1.smashesExito +
              infoSets.set1.equipo1.jugador2.smashesExito),

          equipo2:
            infoSets.set2.equipo2.jugador1.smashesExito +
            infoSets.set2.equipo2.jugador2.smashesExito -
            (infoSets.set1.equipo2.jugador1.smashesExito +
              infoSets.set1.equipo2.jugador2.smashesExito),
        },
        {
          name: "Unforced Errors",
          equipo1:
            infoSets.set2.equipo1.jugador1.unfError +
            infoSets.set2.equipo1.jugador2.unfError -
            (infoSets.set1.equipo1.jugador1.unfError +
              infoSets.set1.equipo1.jugador2.unfError),

          equipo2:
            infoSets.set2.equipo2.jugador1.unfError +
            infoSets.set2.equipo2.jugador2.unfError -
            (infoSets.set1.equipo2.jugador1.unfError +
              infoSets.set1.equipo2.jugador2.unfError),
        },
      ]);
    }

I'm sorry, I know that this looks horrendous, but it's the only way i've been able to make it work. The if(value) refers to the sets, and the 0 is for the entire match.


问:
How to properly cleanup this stack lock
I'm working on a multi-threaded program, and one of the "apps" has the following code for a stack lock:

```<code>/*! Helper class.  Cannonical stack lock */
class StackLock {
public:
    StackLock()
    {
        pthread_mutex_lock(&lock_);
    }
    ~StackLock()
    {
    pthread_mutex_unlock(&lock_);
    }
    static void Init();
private:
    static pthread_mutex_t lock_;
};
pthread_mutex_t StackLock::lock_;
void StackLock::Init()
{
    pthread_mutexattr_t mat;
    pthread_mutexattr_init(&mat);
    //The type of lock set is recursive
    pthread_mutexattr_settype(&mat, PTHREAD_MUTEX_RECURSIVE);
    pthread_mutex_init(&lock_, &mat);
}

/*! Initialization. Called when the thread is restarted.
 * @returns 0;
 */
int32_t LibInit() {

    // .. other code
    StackLock::Init();
    return 0;
}

// There is no "cleanup" function.
</code>```

Then the stack lock is used like this through the remainder of the module:

```<code>
OtherObject* OtherClass::class_method() {
    OtherObject *object(nullptr);
    if (size() != 0) {
        StackLock s;
        // ...
        // There is no StackLock destructor
    }
    return object;
}
</code>```

Our architecture allows for each thread to be restarted during runtime. I've notice that the pthread library allows for users to destroy mutex lock (with pthread_mutex_init), but there isn't any method to do so here.

So I have a few queustions:

Would the StackLock object destruct itself when it leaves OtherClass::class_method()?

Since there is no cleanup or call to pthread_mutex_destroy or pthread_mutexattr_destroy, restarting this module many times would run the risk of a memory leak. Right?

What is the correct way of destructing the stack lock and cleaning up the module in a safe way?

Again I apologize if these are mundane questions. The code has very few comments and is hard to read, so I'm having trouble following it. I appreciate any help. Thanks in advance.

Title: How to properly cleanup this stack lock

Body:
I'm working on a multi-threaded program, and one of the "apps" has the following code for a stack lock:

/*! Helper class.  Cannonical stack lock */
class StackLock {
public:
    StackLock()
    {
        pthread_mutex_lock(&lock_);
    }
    ~StackLock()
    {
    pthread_mutex_unlock(&lock_);
    }
    static void Init();
private:
    static pthread_mutex_t lock_;
};
pthread_mutex_t StackLock::lock_;
void StackLock::Init()
{
    pthread_mutexattr_t mat;
    pthread_mutexattr_init(&mat);
    //The type of lock set is recursive
    pthread_mutexattr_settype(&mat, PTHREAD_MUTEX_RECURSIVE);
    pthread_mutex_init(&lock_, &mat);
}

/*! Initialization. Called when the thread is restarted.
 * @returns 0;
 */
int32_t LibInit() {

    // .. other code
    StackLock::Init();
    return 0;
}

// There is no "cleanup" function.

Then the stack lock is used like this through the remainder of the module:

OtherObject* OtherClass::class_method() {
    OtherObject *object(nullptr);
    if (size() != 0) {
        StackLock s;
        // ...
        // There is no StackLock destructor
    }
    return object;
}

Our architecture allows for each thread to be restarted during runtime. I've notice that the pthread library allows for users to destroy mutex lock (with pthread_mutex_init), but there isn't any method to do so here.

So I have a few queustions:

Would the StackLock object destruct itself when it leaves OtherClass::class_method()?

Since there is no cleanup or call to pthread_mutex_destroy or pthread_mutexattr_destroy, restarting this module many times would run the risk of a memory leak. Right?

What is the correct way of destructing the stack lock and cleaning up the module in a safe way?

Again I apologize if these are mundane questions. The code has very few comments and is hard to read, so I'm having trouble following it. I appreciate any help. Thanks in advance.


问:
Fluent-ffmpeg node js adding subtitles properly on mac but isn't working on ubuntu
I have the same version on both OS but still get different output.

Here is the output that I get on ubuntu for Bengali subtitles:
Ubuntu Output Subtitles

Here is the version and configuration for ubuntu 20:

`

```<code>ffmpeg version 5.1.2-0ubuntu1~20.04.sav1.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr --extra-version='0ubuntu1~20.04.sav1.1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-sndio --enable-pocketsphinx --enable-librsvg --enable-libdav1d --enable-libjxl --enable-librist --enable-libvmaf --enable-libzimg --enable-crystalhd --enable-libmfx --enable-libsvtav1 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
</code>```

`

And here is the version and config for mac os:

ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers built with Apple clang version 14.0.0 (clang-1400.0.29.102) configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon libavutil      57. 28.100 / 57. 28.100 libavcodec     59. 37.100 / 59. 37.100 libavformat    59. 27.100 / 59. 27.100 libavdevice    59.  7.100 / 59.  7.100 libavfilter     8. 44.100 /  8. 44.100 libswscale      6.  7.100 /  6.  7.100 libswresample   4.  7.100 /  4.  7.100 libpostproc    56.  6.100 / 56.  6.100

Also My code is simply this:

`

```<code> ffmpeg(fileName)
    .videoCodec("libx264")
    .audioCodec("libmp3lame")
    .outputOptions(`-vf subtitles=${subtitlesPath}`)
    .on("error", function (err) {
      callback(true, err);
    })
    .save(outputBurnedVideo)
    .on("end", async function () {
      await callback(false, "done");
    });
</code>```

`

I have tried using the sub_charenc option but I wasn't able to get the proper result.

Body:
I have the same version on both OS but still get different output.

Here is the output that I get on ubuntu for Bengali subtitles:
Ubuntu Output Subtitles

Here is the version and configuration for ubuntu 20:

`

ffmpeg version 5.1.2-0ubuntu1~20.04.sav1.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr --extra-version='0ubuntu1~20.04.sav1.1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-sndio --enable-pocketsphinx --enable-librsvg --enable-libdav1d --enable-libjxl --enable-librist --enable-libvmaf --enable-libzimg --enable-crystalhd --enable-libmfx --enable-libsvtav1 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100

`

And here is the version and config for mac os:

ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers built with Apple clang version 14.0.0 (clang-1400.0.29.102) configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon libavutil      57. 28.100 / 57. 28.100 libavcodec     59. 37.100 / 59. 37.100 libavformat    59. 27.100 / 59. 27.100 libavdevice    59.  7.100 / 59.  7.100 libavfilter     8. 44.100 /  8. 44.100 libswscale      6.  7.100 /  6.  7.100 libswresample   4.  7.100 /  4.  7.100 libpostproc    56.  6.100 / 56.  6.100

Also My code is simply this:

`

 ffmpeg(fileName)
    .videoCodec("libx264")
    .audioCodec("libmp3lame")
    .outputOptions(`-vf subtitles=${subtitlesPath}`)
    .on("error", function (err) {
      callback(true, err);
    })
    .save(outputBurnedVideo)
    .on("end", async function () {
      await callback(false, "done");
    });

`

I have tried using the sub_charenc option but I wasn't able to get the proper result.


问:
Add-Computer to domain and rename even it object already exists
Happy Holidays folks,

I'm working on part of a script, this part renames the server and then joins it to the domain. The problem I'm running into is, we pre-stage some objects into AD into the proper OU. When I try to rename the server and rename it to that pre-staged object and add it to the domain I get an error

```<code>Add-Computer : Computer '10.10.204.105' was successfully joined to the new domain '$Domain', but renaming
it to '$Pre-stagedName' failed with the following error message: The account already exists.
</code>```

I can get it to work if I rename the server, restart it, and then add it to the domain after, I'm trying to streamline the process a bit so it happens in one section. Below is what I'm currently trying

```<code>Rename-Computer -ComputerName $IP -NewName $HostName -LocalCredential $DefaultCred
Add-Computer -ComputerName $IP -NewName $HostName -Options JoinWithNewName -DomainCredential $AdminCred -DomainName $Domain -LocalCredential $DefaultCred -Force
</code>```

Body:
Happy Holidays folks,

I'm working on part of a script, this part renames the server and then joins it to the domain. The problem I'm running into is, we pre-stage some objects into AD into the proper OU. When I try to rename the server and rename it to that pre-staged object and add it to the domain I get an error

Add-Computer : Computer '10.10.204.105' was successfully joined to the new domain '$Domain', but renaming
it to '$Pre-stagedName' failed with the following error message: The account already exists.

I can get it to work if I rename the server, restart it, and then add it to the domain after, I'm trying to streamline the process a bit so it happens in one section. Below is what I'm currently trying

Rename-Computer -ComputerName $IP -NewName $HostName -LocalCredential $DefaultCred
Add-Computer -ComputerName $IP -NewName $HostName -Options JoinWithNewName -DomainCredential $AdminCred -DomainName $Domain -LocalCredential $DefaultCred -Force


问:
My api is returning duplicate results, PHP
I have created an API in PHP so that every time it is called it returns a phone number that is in my MySQL database

When the phone number has been delivered or returned by the API, it is removed from the database, because it no longer interests me and I want to prevent it from being returned again.

The problem is when I make more than one request at the same time (at the same second), it returns the same phone number

What I tried to do was use PDO::beginTransaction to try to lock the table record (the phone number) so that another API request would not take that same number, but I have not succeeded, it still returns the same number phone

What happens is that at that same moment or second there can be more than 30 requests to the API requesting a phone number and it always returns the same number to (some) or all queries.

More than 60% of the queries return the same

The question is is there any way or method to fix this?

I attach my code so you can see what I tried:

```<code>try {
    $pdo->beginTransaction();

    $num_numbers = $pdo->prepare("SELECT count(*) as total FROM numbers WHERE user = :user  ORDER BY id ASC LIMIT 1");
    $num_numbers->bindParam(':user', $user);
    if ($num_numbers->execute()) {
        $count = $num_numbers->fetchColumn();

        if ($count > 0) {

            $get_number = $pdo->prepare("SELECT * FROM numbers WHERE user = :user ORDER BY id DESC LIMIT 1");
            $get_number->bindParam(':user', $user);
            if ($get_number->execute()) {

                $data = $get_number->fetch(PDO::FETCH_ASSOC);
                $id = $data['id'];
                $number = trim($data['number']);

                $update = $pdo->prepare("DELETE FROM numbers WHERE id = :id");
                $update->bindParam(':id', $id);
                if ($update->execute()) {
                    $pdo->commit();
                    echo json_encode(array("success" => "true", "number" => "$number",));
                }

            } else {
                echo json_encode(array("success" => "false"));
            }
        } else {
            echo json_encode(array("success" => "false", "number" => "", "error" => "DB empty"));
        }
    } else {
        echo json_encode(array("success" => "false"));
    }

} catch (Exception $e) {
    echo $e->getMessage();
    $pdo->rollBack();
}
</code>```

enter image description here

Body:
I have created an API in PHP so that every time it is called it returns a phone number that is in my MySQL database

When the phone number has been delivered or returned by the API, it is removed from the database, because it no longer interests me and I want to prevent it from being returned again.

The problem is when I make more than one request at the same time (at the same second), it returns the same phone number

What I tried to do was use PDO::beginTransaction to try to lock the table record (the phone number) so that another API request would not take that same number, but I have not succeeded, it still returns the same number phone

What happens is that at that same moment or second there can be more than 30 requests to the API requesting a phone number and it always returns the same number to (some) or all queries.

More than 60% of the queries return the same

The question is is there any way or method to fix this?

I attach my code so you can see what I tried:

try {
    $pdo->beginTransaction();

    $num_numbers = $pdo->prepare("SELECT count(*) as total FROM numbers WHERE user = :user  ORDER BY id ASC LIMIT 1");
    $num_numbers->bindParam(':user', $user);
    if ($num_numbers->execute()) {
        $count = $num_numbers->fetchColumn();

        if ($count > 0) {

            $get_number = $pdo->prepare("SELECT * FROM numbers WHERE user = :user ORDER BY id DESC LIMIT 1");
            $get_number->bindParam(':user', $user);
            if ($get_number->execute()) {

                $data = $get_number->fetch(PDO::FETCH_ASSOC);
                $id = $data['id'];
                $number = trim($data['number']);

                $update = $pdo->prepare("DELETE FROM numbers WHERE id = :id");
                $update->bindParam(':id', $id);
                if ($update->execute()) {
                    $pdo->commit();
                    echo json_encode(array("success" => "true", "number" => "$number",));
                }

            } else {
                echo json_encode(array("success" => "false"));
            }
        } else {
            echo json_encode(array("success" => "false", "number" => "", "error" => "DB empty"));
        }
    } else {
        echo json_encode(array("success" => "false"));
    }

} catch (Exception $e) {
    echo $e->getMessage();
    $pdo->rollBack();
}

enter image description here


问:
Can't edit python code inside kubernetes pod
I want to fast iterate some changes that can only be tested inside my Kubernetes cluster (where the data is). The problem is when I attach to the pod and change anything besides my CLI code, the changes aren't reflected.

I tried reloading the modules with importlib, deleting and re-importing the modules, deleting all the pycache files, nothing works.

Here's the code I'm using to reload the modules (which seemingly doesn't work):

def reload():
    import sys
    import importlib

    # All my modules are inside the app folder
    mymods = [mod for mod in sys.modules.values() if mod.__name__.startswith("app")]

    for module in mymods :
        print(f"reloading {module.__name__}")
        try :
            importlib.reload(module)
        except Exception as e:
            print(e) # nothing gets printed here
            pass
```
<p>The CLI code structure is basically this:</p>
<pre class="lang-py prettyprint-override"><code>import typer

from app.module_a import method_a
from app.module_b import ClassB

app = typer.Typer()

@app.command()
def cli_method(arg1):
    obj = ClassB(arg1)
    return method_a(obj)

if __name__ == "__main__":
    app()
</code>```

Then we invoke the method with:

python app/cli.py cli-method arg1
```

I've already tried to put the reload() before the imports, after the imports, inside the cli_method, but nothing made the code inside the modules be true to what's in the files.

Body:
I want to fast iterate some changes that can only be tested inside my Kubernetes cluster (where the data is). The problem is when I attach to the pod and change anything besides my CLI code, the changes aren't reflected.

I tried reloading the modules with importlib, deleting and re-importing the modules, deleting all the pycache files, nothing works.

Here's the code I'm using to reload the modules (which seemingly doesn't work):

def reload():
    import sys
    import importlib

    # All my modules are inside the app folder
    mymods = [mod for mod in sys.modules.values() if mod.__name__.startswith("app")]

    for module in mymods :
        print(f"reloading {module.__name__}")
        try :
            importlib.reload(module)
        except Exception as e:
            print(e) # nothing gets printed here
            pass

The CLI code structure is basically this:

import typer

from app.module_a import method_a
from app.module_b import ClassB

app = typer.Typer()

@app.command()
def cli_method(arg1):
    obj = ClassB(arg1)
    return method_a(obj)

if __name__ == "__main__":
    app()

Then we invoke the method with:

python app/cli.py cli-method arg1

I've already tried to put the reload() before the imports, after the imports, inside the cli_method, but nothing made the code inside the modules be true to what's in the files.


问:
How to read files faster with .NET Core C# when using FileStream or any better faster way? For calculating SHA256 of files
I have Kingston 2 TB M2 SSD. It has about 3000 MB per second reading.

However when I use the below code, the reading speed is about 153 MB per second even for very large files.

The application exe running in x64 and administrator mode.

How can I speed it up?

I am reading files to calculate their sha256 hash values for comparing.

```<code>using (var stream = File.Open(FilePath, FileMode.Open, FileAccess.Read))
{
    byte[] hash = SHA256.ComputeHash(stream);
}
</code>```

.net Core 7 WPF application

Body:
I have Kingston 2 TB M2 SSD. It has about 3000 MB per second reading.

However when I use the below code, the reading speed is about 153 MB per second even for very large files.

The application exe running in x64 and administrator mode.

How can I speed it up?

I am reading files to calculate their sha256 hash values for comparing.

using (var stream = File.Open(FilePath, FileMode.Open, FileAccess.Read))
{
    byte[] hash = SHA256.ComputeHash(stream);
}

.net Core 7 WPF application


问:
How to insert multiple values into the function argument and use it in a PHP query
I have a PHP function with a query to the database.

```<code>function display_content($dish_type){
    $con = mysqli_connect("localhost", "root", "", "cookbook");

    $sort = isset($_POST["sort"]) ? $sort = $_POST["sort"] : "alphabet";
    $sql = "SELECT * FROM recipes WHERE type = $dish_type ORDER BY name";

    $order_query = "SELECT * FROM recipes WHERE concat(name, description, tags) LIKE '%$data[0]%'".$sqlloop." ".$tag_filter." AND type = $dish_type ORDER BY";

    switch ($sort) {
        case "alphabet":
            $sql = $order_query." name";
        break;

        case "alphabet_rev":
            $sql = $order_query." name DESC";
        break;

        // More...
    }

    $res = mysqli_query($con,$sql);

    while($row = mysqli_fetch_assoc($res)) {
        // Code...
    }

    mysqli_close($con);
}
</code>```

I want to display the results based on the $dish_type (it's a select in HTML). Selecting a type works fine, the content is displayed on the page as it should. The problem is when I'm trying to display all of the dish types at once. Here is the php for calling the function:

```<code>// Display all results <-- the problematic part
function recipe_list_all(){
    ob_start();
    // ???
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        // ???
    }
}

// Display results for "dishes"
function recipe_list_dishes(){
    ob_start();
    display_content(array("snacks", "dishes", "desserts", "other"));
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        display_content("dishes");
    }
}

// Display results for "desserts"
function recipe_list_desserts(){
    ob_start();
    display_content("'desserts'");
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        display_content("'desserts'");
    }
}

// Display results for "snacks"
function recipe_list_snacks(){
    ob_start();
    display_content("'snacks'");
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        display_content("'snacks'");
    }
}

// Display results for "other"
function recipe_list_other(){
    ob_start();
    display_content("'other'");
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        display_content("'other'");
    }
}

$food_type = isset($_POST["food_type"]) ? $food_type = $_POST["food_type"] : "all_types";

switch ($food_type){
    case "all_types":
        recipe_list_all();
    break;

    case "dishes":
        recipe_list_dishes();
    break;

    case "desserts":
        recipe_list_desserts();
    break;

    case "snacks":
        recipe_list_snacks();
    break;

    case "other":
        recipe_list_other();
    break;
}
</code>```

I can't do something like this:

```<code>function recipe_list_all(){
    ob_start();
    recipe_list_dishes();
    recipe_list_desserts();
    recipe_list_snacks();
    recipe_list_other();
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        recipe_list_dishes();
        recipe_list_desserts();
        recipe_list_snacks();
        recipe_list_other();
    }
}
</code>```

because it will display the results separated. I have a sorting system, so the results will be sorted (for example) alphabetically a-z for dishes, then a-z for desserts, etc. I want to mix the results. How can I do that?

Body:
I have a PHP function with a query to the database.

function display_content($dish_type){
    $con = mysqli_connect("localhost", "root", "", "cookbook");

    $sort = isset($_POST["sort"]) ? $sort = $_POST["sort"] : "alphabet";
    $sql = "SELECT * FROM recipes WHERE type = $dish_type ORDER BY name";

    $order_query = "SELECT * FROM recipes WHERE concat(name, description, tags) LIKE '%$data[0]%'".$sqlloop." ".$tag_filter." AND type = $dish_type ORDER BY";

    switch ($sort) {
        case "alphabet":
            $sql = $order_query." name";
        break;

        case "alphabet_rev":
            $sql = $order_query." name DESC";
        break;

        // More...
    }

    $res = mysqli_query($con,$sql);

    while($row = mysqli_fetch_assoc($res)) {
        // Code...
    }

    mysqli_close($con);
}

I want to display the results based on the $dish_type (it's a select in HTML). Selecting a type works fine, the content is displayed on the page as it should. The problem is when I'm trying to display all of the dish types at once. Here is the php for calling the function:

// Display all results <-- the problematic part
function recipe_list_all(){
    ob_start();
    // ???
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        // ???
    }
}

// Display results for "dishes"
function recipe_list_dishes(){
    ob_start();
    display_content(array("snacks", "dishes", "desserts", "other"));
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        display_content("dishes");
    }
}

// Display results for "desserts"
function recipe_list_desserts(){
    ob_start();
    display_content("'desserts'");
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        display_content("'desserts'");
    }
}

// Display results for "snacks"
function recipe_list_snacks(){
    ob_start();
    display_content("'snacks'");
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        display_content("'snacks'");
    }
}

// Display results for "other"
function recipe_list_other(){
    ob_start();
    display_content("'other'");
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        display_content("'other'");
    }
}

$food_type = isset($_POST["food_type"]) ? $food_type = $_POST["food_type"] : "all_types";

switch ($food_type){
    case "all_types":
        recipe_list_all();
    break;

    case "dishes":
        recipe_list_dishes();
    break;

    case "desserts":
        recipe_list_desserts();
    break;

    case "snacks":
        recipe_list_snacks();
    break;

    case "other":
        recipe_list_other();
    break;
}

I can't do something like this:

function recipe_list_all(){
    ob_start();
    recipe_list_dishes();
    recipe_list_desserts();
    recipe_list_snacks();
    recipe_list_other();
    $content = ob_get_contents();
    ob_end_clean();

    if(!empty($content)){
        recipe_list_dishes();
        recipe_list_desserts();
        recipe_list_snacks();
        recipe_list_other();
    }
}

because it will display the results separated. I have a sorting system, so the results will be sorted (for example) alphabetically a-z for dishes, then a-z for desserts, etc. I want to mix the results. How can I do that?


问:
Is there any way to remove the (1) at the end when doing firebase app distributions?
I am deploying a flutter app to firebase app distribution via the firebase cli and fastlane and never figured out how to remove the parentheses in the end.

I removed the '+' at the end of the version number in our flutter project's pubspec.yaml but it still persisted.

Didn't see anything either in the firebase console or the files that were added to our project after adding fastlane (AppFile, Fastfile)


问:
Looping over images with docxtemplater-image-module@3.1.0
I want to export an x amount of images coming from a dynamic array. How is it possible? So far it's only exporting the last value of the array.

I'm guessing something related to this but what am I missing?

```<code>images = [{image: image1, image: image2, image: image3...}]

{#images}
{%image}
{/images}
</code>```

Body:
I want to export an x amount of images coming from a dynamic array. How is it possible? So far it's only exporting the last value of the array.

I'm guessing something related to this but what am I missing?

images = [{image: image1, image: image2, image: image3...}]

{#images}
{%image}
{/images}