FullCalendar with Meteor 3.3.1 – Event Colors and Size Issue on Mobile Build (iOS/Android)

I’m using FullCalendar React with Meteor 3.3.1, and I’m running into an issue when building the mobile version (iOS/Android). The calendar appears fine in the web version, including when viewed responsively in a browser. However, in the mobile build, it looks like this:

enter image description here

As you can see:

The event colors are missing.

The calendar appears much smaller than expected.

This only happens in the mobile builds, not in the web or responsive views. Any ideas on what might be causing this or how to fix it?

Thanks in advance!

import FullCalendar from '@fullcalendar/react'; // Import FullCalendar React component
import dayGridPlugin from '@fullcalendar/daygrid'; // Import plugins
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction'; // For drag and drop
import { getCalendarLocale } from '/imports/ui/lang/fullcalendar.lang.js';


<FullCalendar
    ref={calendarRef}
    events={props.meteordata_events}
    {...calendarOptions}
/>

Shadcn sidebar gap

I have created a sidebar in react router. When I place the side bar in other pages, it works fine. When I place it in the root file, it has a gap that I can’t seem to figure out. I have played around with CSS, both root and app sidebar but nothing helps. How can I fix this?

Screenshot of the account page

I have tinkered with the root.tsx and appsidebar.tsx but the gap still sticks, with or without the trigger, that gap is still there.

root.tsx

export function Layout({ children }: { children: React.ReactNode }) {
  return (
   <html lang="en">
   <head>
    <meta charSet="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <Meta />
    <Links />
    <script
     dangerouslySetInnerHTML={{
      __html: `
        (function() {
          try {
            const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
            const stored = localStorage.getItem('theme');
            const theme = stored || (prefersDark ? 'dark' : 'light');
            if (theme === 'dark') {
              document.documentElement.classList.add('dark');
            } else {
              document.documentElement.classList.remove('dark');
            }
          } catch (_) {}
        })();
      `,
     }}
    />
   </head>
   <body className="flex flex-col">
   {/* Top navigation always at the top */}
   <TopNav />
   
   {/* Sidebar + content below */}
   <SidebarProvider
    style={
     {
      "--sidebar-width": "21rem",
     } as React.CSSProperties
    }
   >
    <div className="flex flex-1">
     {/* Sidebar */}
     <AppSidebar />
     <SidebarTrigger className="sticky top-14 self-start z-50 " />
     {/* Main page content */}
     <main className="flex-1 overflow-y-auto">
      {children}
     </main>
    </div>
   </SidebarProvider>
   
   <ScrollRestoration />
   <Scripts />
   </body>
   </html>
  );
}

appsidebar.tsx

export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
  return (
   <Sidebar {...props} className="">
    <SidebarHeader>
     <SidebarMenu>
      <SidebarMenuItem>
       <SidebarMenuButton size="lg" asChild>
       <b/>
       </SidebarMenuButton>
      </SidebarMenuItem>
     </SidebarMenu>
    </SidebarHeader>
    <SidebarContent>
     <SidebarGroup>
      <SidebarMenu>
       {data.navMain.map((item, index) => (
        <Collapsible
         key={item.title}
         defaultOpen={index === 1}
         className="group/collapsible"
        >
         <SidebarMenuItem>
          <CollapsibleTrigger asChild>
           <SidebarMenuButton>
            {item.title}{" "}
            <Plus className="ml-auto group-data-[state=open]/collapsible:hidden" />
            <Minus className="ml-auto group-data-[state=closed]/collapsible:hidden" />
           </SidebarMenuButton>
          </CollapsibleTrigger>
          {item.items?.length ? (
           <CollapsibleContent>
            <SidebarMenuSub>
             {item.items.map((item) => (
              <SidebarMenuSubItem key={item.title}>
               <SidebarMenuSubButton
                asChild
                isActive={item.isActive}
               >
                <a href={item.url}>{item.title}</a>
               </SidebarMenuSubButton>
              </SidebarMenuSubItem>
             ))}
            </SidebarMenuSub>
           </CollapsibleContent>
          ) : null}
         </SidebarMenuItem>
        </Collapsible>
       ))}
      </SidebarMenu>
     </SidebarGroup>
    </SidebarContent>
    <SidebarRail />
   </Sidebar>
  )
}

How can I get Javascript to report the maximum possible width of the viewport of the browser on any device?

How can I get Javascript to read the maximum possible width of the viewport of any browser on any device when the browser window width is fully expanded on the device?

I have tried;

maxViewportWidth = window.screen.width;

But when I get Javascript to render this value in the browser it is less than window.innerWidth as I expand the browser window width.

Populate global js object during build of each astro page and do x when the build of page finishes

I am attaching astro to the stack of a company to facilitate the generation of all pages in a component-based way. The company uses a handy automation which auto-generates a single .ts module file per API endpoint of their API. Each of these endpoint .ts files exports an array variable called csrf of CSRF-Token identifiers (type string[]). How can I, at the end of each page build, access the aggregated array of all CSRF-Token identifiers imported via the bundled script tag of the built astro page, and do something with it / store the array in an external .json file?

As you may thought, the goal behind this is to auto-generate an array of the identifiers of all CSRF-Tokens needed on a prerendered astro page (according to the above-mentioned (recursive) resolution of all modules needed in the page).

The alternative to this is of course specifying manually at the top-level per astro page which CSRF-Tokens are needed on the page, but that’s how they do it currently, and it not rarely leads to a page running without all CSRF-Tokens it needs (utlimately resulting in failed requests).

Removing part of some text via JavaScript

I need to remove some text from an WordPress events plugin that displays events in a grid with full location name and address. I want to remove the address and leave the location name. However despite there being separate fields for these details in the back end, the name and address are displayed in the same HTML div. Is there a way, using JavaScript, of removing the address only? The code is as follows:

<script type="application/ld+json">
            {
                "@context": "http://schema.org",
                "@type": "Event",
                "eventStatus": "https://schema.org/EventScheduled",
                "startDate": "2025-08-27",
                "endDate": "2025-08-27",
                "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
                "location":
                {
                    "@type": "Place",
                                        "name": "West and Wardlawhill Parish Church",
                    "image": "https://9jh.adb.myftpupload.com/wp-content/uploads/2025/08/placeholder-4-1.png",
                    "address": "1 Western Ave, Rutherglen, Glasgow G73 1JQ"
                                    },
                                "organizer":
                {
                    "@type": "Person",
                    "name": "",
                    "url": ""
                },
                                "offers":
                {
                    "url": "https://9jh.adb.myftpupload.com/events/daily-each-3-days/",
                    "price": "0",
                    "priceCurrency": "GBP",
                    "availability": "https://schema.org/InStock",
                    "validFrom": "2025-08-27T00:00"
                },
                "performer": "",
                "description": "Join us for a fun walk from West and Wardlawhill Parish Church through Malls Mire. Bring the kids, bring a friend, all welcome! Come along and meet new friends.  If you have any questions, call 0141 646 0123.    By registering to an event, you consent to Healthy n Happy processing your information as per our Privacy Policy.  We will only keep information that is relevant to the type of involvement you have with us.  You can withdraw your consent at any time by contacting [email protected]",
                "image": "https://9jh.adb.myftpupload.com/wp-content/uploads/2025/08/walks.jpg",
                "name": "Walk Way Us Wednesday",
                "url": "https://9jh.adb.myftpupload.com/events/daily-each-3-days/?occurrence=2025-08-27"
            }
            </script>

<p class="mec-grid-event-location">West and Wardlawhill Parish Church, 1 Western Ave, Rutherglen, Glasgow G73 1JQ</p>

The plugin support advised me to use JavaScript to remove the address, but I don’t know how.

I can render a component using routes without having to declare that component in ngModule?

I created a separate component, then added it to the routes array, then I ran the url and saw that the component still rendered in as usual without having to declare that component in any ngModule. The angular version I’m using is v17 and as far as I know, when ng build and ng serve, the routes will work differently.

    //app-routing.module.ts


        import { NgModule } from '@angular/core';
        import { RouterModule, Routes } from '@angular/router';
        import { LoggerComponent } from './no-stand-alone/logger.component';
        import { NoStandAlone1Component } from './no-stand-alone/no-stand-alone-1/no-stand-alone-1.component';
        import { NoModuleComponent } from './no-module/no-module.component';
        
        const routes: Routes = [
          {
            path: "no-module",
            component: NoModuleComponent
          }
        ];
        
        @NgModule({
          imports: [RouterModule.forRoot(routes)],
          exports: [RouterModule]
        })
        export class AppRoutingModule { }

------------------------------------------------------------------------------------
    //no-module.component.ts
    
    
    import { Component } from "@angular/core";
    
    @Component({
      standalone: false,
      selector: "app-no-module",
      template: `<h1>active no module</h1>`,
      styles: []
    })
    export class NoModuleComponent{}

Ethers.js can call fetchMarketItems() fine, but PHP (web3p/web3.php) fails to decode the tuple[] return — how do I read struct[] results?

I have an NFT marketplace contract running on a local Hardhat node. The function below returns an array of structs:

struct MarketItem {
    uint256 tokenId;
    address payable seller;
    address payable owner;
    uint256 price;
    bool sold;
}
function fetchMarketItems() public view returns (MarketItem[] memory) {
    // ...
}

ABI excerpt:


{
  "inputs": [],
  "name": "fetchMarketItems",
  "outputs": [
    {
      "components": [
        { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
        { "internalType": "address payable", "name": "seller", "type": "address" },
        { "internalType": "address payable", "name": "owner",  "type": "address" },
        { "internalType": "uint256", "name": "price",  "type": "uint256" },
        { "internalType": "bool",    "name": "sold",   "type": "bool" }
      ],
      "internalType": "struct NFTMarketplace.MarketItem[]",
      "name": "",
      "type": "tuple[]"
    }
  ],
  "stateMutability": "view",
  "type": "function"
}

What works (JS / ethers.js)

if (!NFTMarketplaceABI) await loadABI();
const provider = new ethers.providers.JsonRpcProvider(); // Hardhat default localhost
const contract  = new ethers.Contract(
  "0x5FbDB2315678afecb367f032d93F642f64180aa3",
  NFTMarketplaceABI,
  provider
);
const data = await contract.fetchMarketItems();
console.log(data); // OK: array of items

What fails (PHP / web3p/web3.php)

Environment: PHP 8.x, Laravel, web3p/web3.php (Contract/HttpProvider/HttpRequestManager), Hardhat node accessible at http://172.17.0.1:8545 from inside Docker.

$provider        = new HttpProvider(new HttpRequestManager('http://172.17.0.1:8545'));
$contractAddress = '0x5FbDB2315678afecb367f032d93F642f64180aa3';

$abiPath = app()->basePath('public/NFTMarketplace.json');
$abiJson = json_decode(file_get_contents($abiPath), true);
if (!isset($abiJson['abi'])) {
    throw new Exception('ABI not found');
}

$contract = new Contract($provider, $abiJson['abi']);
$contract->at($contractAddress);

// sanity check
$contract->eth->getCode($contractAddress, 'latest', function ($e, $code) {
    if ($e !== null) throw new Exception($e->getMessage());
    if ($code === '0x' || $code === '0x0') throw new Exception('Address is not a contract');
});

$items  = [];
$errMsg = null;

$contract->call('fetchMarketItems', [], function ($err, $result) use (&$items, &$errMsg) {
    if ($err !== null) { $errMsg = $err->getMessage(); return; }
    $items = $result ?? [];
});

if ($errMsg) {
    throw new RuntimeException("fetchMarketItems failed: {$errMsg}");
}

Actual result: the callback receives an error and $errMsg is set. Example message I see:
fetchMarketItems failed: unsupported or invalid solidity type “tuple[]” (message may vary; earlier I’ve also hit decode-related errors while stepping through the library’s ABI decoder).

Expected: an array of market items, same as in ethers.js.

What I’ve tried

Verified the contract address and eth_getCode (non-zero).

Confirmed the ABI file is the same one ethers.js uses.

Tried both 127.0.0.1:8545 and 172.17.0.1:8545 (Docker host).

Searched issues/docs for tuple[]/struct[] return support in web3p/web3.php.

Tested simpler functions (e.g., returns uint256) — those work.

Question

Does web3p/web3.php support decoding returns of dynamic arrays of structs (tuple[]) from Solidity? If yes, what is the correct way to call/define the ABI so that Contract->call(‘fetchMarketItems’) returns decoded data? If not, what are practical workarounds in PHP (e.g., returning parallel arrays, using another ABI decoder/package, or different PHP Web3 library) to read struct[] results?

Notes

Node: Hardhat local chain

Contract: 0x5FbDB2315678afecb367f032d93F642f64180aa3

Framework: Laravel

Library: web3p/web3.php

Everything up to $contract->call(‘fetchMarketItems’, …) works fine — the provider connects, the ABI loads, eth_getCode returns bytecode (non-zero), and simple view calls (e.g., listingPrice()) decode correctly. The error only appears when calling fetchMarketItems (returns tuple[]).

preg_replace regex take too much from string, want to replace text inner [duplicate]

have a problem with preg_replace.
I have BBCodes and want them replace.
lets say i want to replace the attach bbcode with attachment id: 35318

String:

[ATTACH]35316[/ATTACH][ATTACH]35318[/ATTACH]
[ATTACH]35317[/ATTACH]

preg_replace:

preg_replace('/[ATTACH(.*)]35318[/ATTACH]/', '[ATTACH type="full" alt="test" width="250px"]35318[/ATTACH]', $input_lines);

it deletes

[ATTACH]35316[/ATTACH]

result:

[ATTACH type="full" alt="test" width="250px"]35318[/ATTACH]
[ATTACH]35317[/ATTACH]

need result:

 [ATTACH]35316[/ATTACH][ATTACH type="full" alt="test" width="250px"]35318[/ATTACH][ATTACH]35317[/ATTACH]

is there a solution with preg_replace to take inner replace from the 35318

my solution, but it is a workaround:
put whitespaces between closing attach and opening attach and then run preg_replace and after that remove whitespaces between closing attach and opening attach

Experiencing high loads for Apache/PHP-FPM site [closed]

Traditionally, the load average of our Alma Linux server running our Apache/PHP-FPM/MariaDB website has been 1-3. We’ve recently experienced some good press and it appears our server is getting more traffic and the load is sustaining at 4-6 with burst above 10. We use Cloudflare, when I turn on “Under Attack Mode”, which essentially puts up the page to verify visitors are human, it immediately subsides to back to traditional levels. I’ve been watching Apache server status and see the requests being processed jumps from 5-20 to above 50 and hits 100 causing the high loads and when I need to enable the setting in Cloudflare until it drops to acceptable loads. I can see the status in Cloudflare showing the number of requests on the rise as well when this happens and php-fpm status page shows maxed out active processes. If I increase max_children, the load just increases dramatically as active processes reach their max_children. We are a local newsroom, the high traffic usually traces back to a news story getting shared or picked up by a national company. We got some recent national press, I had to leave the Cloudflare protection on most of the day and week following, and it has been coming in waves since.

So, I am trying to determine if it is time to add another server and look at load balancing or if some optimization is what’s needed. Or both. We are running Apache 2.4.62, PHP-FPM 8.3.24 and MariaDB 10.11.14.

Looking at top it seems php-fpm may be the cause of the high load at 98% CPU for one process during periods of high loads and the rest of the php-fpm processes 10-40% with the MariaDB processlist showing little with no queries more than 0 time, I may have one pop in there for 2-3 seconds, but nothing more and I never see more than 20-25 sleep processes during the high load.

As far as php-fpm, here are the current pertinent settings with typical system info during high loads…

pm = ondemand
pm.max_children = 15
pm.process_idle_timeout = 10s;
pm.max_requests = 500

ATOP - alma1         2025/08/26  18:37:13         -----------------          10s elapsed
PRC |  sys    4.37s  | user  49.41s  |  #proc    189  |  #zombie    0 |  #exit     10  |
CPU |  sys      41%  | user    494%  |  irq       4%  |  idle     61% |  wait      1%  |
cpu |  sys       7%  | user     86%  |  irq       1%  |  idle      6% |  cpu003 w  0%  |
cpu |  sys       6%  | user     84%  |  irq       1%  |  idle      9% |  cpu004 w  0%  |
cpu |  sys       7%  | user     83%  |  irq       1%  |  idle      9% |  cpu001 w  0%  |
cpu |  sys       7%  | user     80%  |  irq       1%  |  idle     12% |  cpu005 w  0%  |
cpu |  sys       7%  | user     80%  |  irq       1%  |  idle     12% |  cpu002 w  0%  |
cpu |  sys       7%  | user     79%  |  irq       1%  |  idle     13% |  cpu000 w  0%  |
CPL |  avg1    9.03  | avg5    9.64  |  avg15   8.23  |  csw    81558 |  intr  104638  |
MEM |  tot    15.4G  | free  250.5M  |  buff   91.9M  |  slab  624.6M |  numnode    1  |
SWP |  tot   512.0M  | free    8.3M  |  swcac   5.9M  |  vmcom  16.1G |  vmlim   8.2G  |
PAG |  numamig    0  | migrate 14e3  |  swin       0  |  swout      0 |  oomkill    0  |
DSK |           sda  | busy      1%  |  read     151  |  write    517 |  avio 0.19 ms  |
NET |  transport     | tcpi   13312  |  tcpo   26862  |  udpi     891 |  udpo     891  |
NET |  network       | ipi    14203  |  ipo    19189  |  ipfrw      0 |  deliv  14203  |
NET |  eth0    ----  | pcki   14197  |  pcko   19173  |  si 3192 Kbps |  so   28 Mbps  |
NET |  lo      ----  | pcki      16  |  pcko      16  |  si    4 Kbps |  so    4 Kbps  |

    PID SYSCPU USRCPU  RDELAY  VGROW  RGROW   RDDSK  WRDSK S  CPUNR  CPU CMD         1/5
2064409  0.16s  8.07s   1.52s 112.8M  45.7M    5.1M     0B R      1  82% php-fpm
2036955  0.25s  3.31s   1.27s  -4.0M  -4.2M      0B     0B S      0  36% php-fpm
2035984  0.29s  3.26s   0.81s   6.0M 133.0M      0B     0B R      4  36% php-fpm
2032153  0.24s  3.16s   1.44s   2.0M   2.0M      0B     0B S      5  34% php-fpm
2032982  0.22s  3.06s   1.36s   8.0M   8.1M      0B     0B S      1  33% php-fpm
2036323  0.22s  2.95s   1.50s     0B 112.0K      0B     0B S      2  32% php-fpm
2036736  0.22s  2.86s   1.28s   2.0M   2.2M      0B     0B S      5  31% php-fpm
2063710  0.28s  2.62s   1.66s     0B 129.3M      0B     0B R      0  29% php-fpm
2039311  0.22s  2.67s   1.12s     0B     0B      0B     0B R      0  29% php-fpm
2035483  0.22s  2.65s   0.95s     0B     0B      0B     0B R      2  29% php-fpm
2033448  0.24s  2.57s   1.22s   4.0M   3.4M      0B     0B S      4  28% php-fpm
2032951  0.21s  2.57s   1.45s  -2.0M  -1.1M      0B     0B S      0  28% php-fpm
2031692  0.21s  2.41s   0.97s -40.2M -34.5M      0B     0B S      0  26% php-fpm
2032826  0.21s  2.38s   1.24s   2.0M   2.0M      0B     0B R      5  26% php-fpm
3480718  0.60s  1.63s   5m46s     0B  13.6M   16.0K   2.3M S      0  22% mariadbd
2064719  0.17s  1.49s   0.43s 841.9M 210.9M      0B     0B S      2  17% php-fpm

Server load: 9.38 9.71 8.25
Total accesses: 16713 - Total Traffic: 1.4 GB - Total Duration: 22404839
CPU Usage: u7.5 s2.7 cu15.16 cs5.47 - 1.77% CPU load
9.62 requests/sec - 0.8 MB/second - 90.0 kB/request - 1340.56 ms/request
29 requests currently being processed, 0 workers gracefully restarting, 67 idle workers

Seeing what is taking my memory, I have this script…

[root@alma1 ~]# cat apache_mem_usage.sh
#!/usr/bin/sh
ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache memory usage (MB): "x/1024; print "Average Apache Process Size (MB): "x/((y-1)*1024)}'
ps -ylC php-fpm | awk '{x += $8;y += 1} END {print "PHP-FPM memory usage (MB): "x/1024; print "Average PHP-FPM Process Size (MB): "x/((y-1)*1024)}'
ps -ylC mariadbd | awk '{x += $8;y += 1} END {print "MariaDB memory usage (MB): "x/1024}'
free
[root@alma1 ~]# ./apache_mem_usage.sh
Apache memory usage (MB): 279.188
Average Apache Process Size (MB): 27.9187
PHP-FPM memory usage (MB): 5103.15
Average PHP-FPM Process Size (MB): 318.947
MariaDB memory usage (MB): 6707.73
               total        used        free      shared  buff/cache   available
Mem:        16113200     9426012      307164      441444     7163324     6687188
Swap:         524284      516656        7628

Perhaps the PHP-FPM process memory usage is higher than it should be? The innodb_buffer_pool_size parameter for MariaDB is set to 6G and I found the query that shows it could possibly need to be 3 times that size or some db optimization may be needed…

MariaDB [(none)]> SELECT CEILING(Total_InnoDB_Bytes*1.6/POWER(1024,3)) RIBPS FROM (SELECT SUM(data_length+index_length) Total_InnoDB_Bytes FROM information_schema.tables WHERE engine='InnoDB') A;
+-------+
| RIBPS |
+-------+
|    18 |
+-------+

So I don’t believe I can give up any of that memory for PHP unless I reduce that number. The largest innodb table I have is 19 million rows that tracks ads and has been running for many years with 3 indexes…

MariaDB [wmnf_www]> SHOW TABLE STATUS LIKE 'wp_ad_tracker' G;
*************************** 1. row ***************************
            Name: wp_ad_tracker
          Engine: InnoDB
         Version: 10
      Row_format: Dynamic
            Rows: 19829074
  Avg_row_length: 52
     Data_length: 1047511040
 Max_data_length: 0
    Index_length: 1000275968
       Data_free: 4194304
  Auto_increment: 146764111
     Create_time: 2025-04-20 09:53:51
     Update_time: 2025-08-26 17:39:10
      Check_time: NULL
       Collation: utf8mb4_unicode_ci
        Checksum: NULL
  Create_options:
         Comment:
Max_index_length: 0
       Temporary: N

I’ll leave it at that for now, looking for pointers or recommendations on best way to proceed to get the loads reduced.

Using the SDK, cloud tasks are always created with default deadline, ignoring setDispatchDeadline

We are creating tasks using the following code with the SDK:

use GoogleCloudTasksV2ClientCloudTasksClient;
use GoogleCloudTasksV2HttpMethod;
use GoogleCloudTasksV2HttpRequest;
use GoogleCloudTasksV2OidcToken;
use GoogleCloudTasksV2Task;

...

$client = new CloudTasksClient();
$parent = $client->queueName(self::PROJECTE, self::REGIO, $this->cua);
            
$httpRequest = new HttpRequest();
$httpRequest->setHttpMethod($metode);
$httpRequest->setUrl(self::prepararUrl($url, $metode, $this->parametres ?? null));
$httpRequest->setHeaders(self::prepararHeaders($headers));
            
if ($parametres && in_array($metode, [HttpMethod::POST, HttpMethod::PUT, HttpMethod::PATCH])) {
    $httpRequest->setBody(http_build_query($parametres));
}
            
if ($this->cua === self::CUA_PERMISOS) {
     $oidcToken = new OidcToken();
     $oidcToken->setServiceAccountEmail(self::SERVICE_ACCOUNT);
     $oidcToken->setAudience(self::URL_SERVEI_WORKER);
     $httpRequest->setOidcToken($oidcToken);
}
            
$tasca = new Task();
$tasca->setHttpRequest($httpRequest);
$tasca->setDispatchDeadline((new GoogleProtobufDuration())->setSeconds(1800));
            
$request = (new GoogleCloudTasksV2CreateTaskRequest())->setParent($parent)->setTask($tasca);
$client->createTask($request);

This is creating tasks with deadlines of 600 seconds, ignoring the 1800 set on the request:
Log for the task created

Acording to the docs, the maximum value is 1800 (30 minutes) for Cloud Task dispatching an HTTP request.

We are using PHP 8.3 with these libraries:

{
  "google/apiclient": "^2.18",
  "google/cloud-storage": "^1.36",
  "google/cloud-logging": "^1.31",
  "google/cloud-error-reporting": "^0.22.7",
  "google/cloud-tasks": "^1.15"
}

Any insight on how/why this happens?

We tried passing a string directly instead of the Durationobject to the method Task::setDispatchDeadline, but the result has always been the same.

Unable to install composer, “Unable to load dynamic library ‘wincache'” [duplicate]

I’m trying to install Composer on my machine and I’ve downloaded the installer from getcomposer.com, but when I run it I get the error “The PHP exe file you specified did not run correctly” with the following program output:

PHP Warning: Module “ldap” is already loaded

PHP Warning: Module “mysqli” is already loaded

PHP Warning: PHP Startup: Unable to load dynamic library ‘wincache’ (tried: C:Program Filesphp8.3.9extwincache (The specified module could not be found), C:Program Filesphp8.3.9extphp_wincache.dll (The specified module could not be found))

It appears based on the output that the problem is with my wincache dll file, but I’ve checked in php8.3.9ext and there is a file called php_wincache.dll. For some reason, the installer doesn’t seem to recognize it. Does anyone know how I can resolve this issue and run the installer?

textarea auto-resize and controlled input causes flicker and cursor jump

I am working on a chat input box in React that should behave like a ChatGPT textarea:

  1. expand automatically as the user types
  2. wrap long lines without horizontal scroll
  3. Submit message on Enter, insert newline on shift+enter

My Code:

Parent component:

import { useEffect, useState } from "react";
import ChatInput from "./ChatInput";

export default function App() {
  const [tick, setTick] = useState(0);
  useEffect(() => {
    const id = setInterval(() => setTick(t => t + 1), 1000);
    return () => clearInterval(id);
  }, []);

  return (
    <div style={{ padding: 24 }}>
      <p>Parent tick: {tick}</p>
      <ChatInput onSubmit={(m) => console.log("submit:", m)} />
    </div>
  );
}

Child Component:

export default function ChatInput({ onSubmit }) {
  const [message, setMessage] = useState("");
  const ref = useRef(null);
  const handleChange = (e) => {
    setMessage(e.target.value);
    const el = ref.current;
    if (el) {
      el.style.height = "0px";                  
      el.style.height = `${el.scrollHeight}px`; 
    }
  };
  const handleKeyDown = (e) => {
    if (e.key === "Enter" && !e.shiftKey) {
      e.preventDefault();
      onSubmit(message);
      setMessage("");
      if (ref.current) ref.current.style.height = "0px";
    }
  };
  return (
    <textarea
      ref={ref}
      value={message}
      onChange={handleChange}
      onKeyDown={handleKeyDown}
      rows={1}
      placeholder="Write your message..."
      style={{
        width: "100%",
        resize: "none",
        overflow: "hidden",
        whiteSpace: "pre-wrap",
        wordBreak: "break-word"
      }}
    />
  );
}

Issue:
Sometimes the textarea flickers when resizing. In some browsers (especially Chrome), the cursor jumps to the end of the text if I try to edit in the middle of the message. This occurs more when the component re renders (example:- parent state updates).

Steps to reproduce:

  1. Type multiple lines so the textarea grows.

  2. Click in the middle of the text and edit.

  3. Observe flicker/caret jump, especially when app’s tick forces a parent re-render.

What I tried:

  1. Using onChange instead of onInput same issue.
  2. Moving the resize logic into a useEffect() still flickers.
  3. Wrapping height reset in requestAnimationFrame reduces flicker but cursor jump still happens.

How to exclude some class or pages using .offset().top

I’m using this part of code on my website and it works very well:

$(document).ready(function() {
  setTimeout(function() {
    var scroll = $('.restaurant, .mention, .politique, .condition').offset().top;    
    $('html, body').animate({ scrollTop: scroll }, 2000);
  }, 2500); 
});

But I don’t want to use it in all pages, so I’ve this error:

Uncaught TypeError: can’t access property “top”, $(…).offset() is undefined

In pages where these class aren’t used:

$('.restaurant, .mention, .politique, .condition')

My problem is that I don’t know how to use this part of code only for some pages with class I mentioned not others. I tried to add .not('.links-body') like this:

$(document).ready(function() {
  setTimeout(function() {
    var scroll = $('.restaurant, .mention, .politique, .condition').not('.links-body').offset().top;    
    $('html, body').animate({ scrollTop: scroll }, 2000);
  }, 2500); 
});

Or replace $('html, body').animate by $('.home-video').animate like this, to apply this part of code only for pages who use .home-video class :

$('.home-video').animate({ scrollTop: scroll }, 2000); 

But it does not work, I still have the error in the page. Do you have an idea on how to exclude some pages or class for this part of code?

I’m new to HTML and I can’t figure out this problem

    </td>
    </tr>

    <!-- Menu -->
    <tr>
      <td colspan="2" align="center">
        <a href="#">Trang chủ</a> | 
        <a href="#">Giới thiệu</a> | 
        <a href="#">Sản phẩm</a> | 
        <a href="#">Tin tức</a> | 
        <a href="#">Liên hệ</a>
      </td>
    </tr>

    <!-- Banner quảng cáo -->
    <tr>
      <td colspan="2" align="center">
        <img src="banner.png" alt="Banner quảng cáo" height="40">
      </td>
    </tr>

    <!-- Nội dung chính với 3 cột -->
    <tr valign="top">
      <!-- Danh mục (trái) -->
      <td width="15%">
        <b>Danh mục</b><br>
        <a href="#">Danh mục 1</a><br>
        <a href="#">Danh mục 2</a><br>
        <a href="#">Danh mục 3</a><br>
      </td>

      <!-- Nội dung chính (giữa) -->
      <td width="70%">
        <h2>Nội dung chính</h2>
        Đây là khu vực nội dung chính: bài viết nổi bật hoặc sản phẩm.
        <br><br>
        <table border="1" width="90%" cellspacing="0" cellpadding="5" align="center">
          <tr align="center">
            <td><b>Hình</b></td>
            <td><b>Tên sản phẩm</b></td>
            <td><b>Giá</b></td>
          </tr>
          <tr align="center">
            <td><img src="spA.png" alt="Sản phẩm A" height="30"></td>
            <td>Sản phẩm A</td>
            <td>100.000đ</td>
          </tr>
          <tr align="center">
            <td><img src="spB.png" alt="Sản phẩm B" height="30"></td>
            <td>Sản phẩm B</td>
            <td>150.000đ</td>
          </tr>
        </table>
      </td>

      <!-- Tin mới + Quảng cáo (phải) -->
      <td width="15%">
        <b>Tin mới</b>
        <ul>
          <li><a href="#">Tin 1</a></li>
          <li><a href="#">Tin 2</a></li>
        </ul>
        <b>Quảng cáo nhỏ</b><br>
        <img src="qc.png" alt="QC nhỏ" height="40">
      </td>
    </tr>

    <!-- Footer -->
    <tr>
      <td colspan="3" align="center">
        © 2025 Công ty ABC | Liên hệ: [email protected]
      </td>
    </tr>
  </table>
</body>
</html>

I am currently working on a simple HTML project where I am building a page layout using only a table element because I am still very new to web development and have not yet started learning CSS, and my intention is to divide the page into different sections such as a header, a menu row, a banner row, and then a content row where the left column is supposed to act as a small sidebar for categories or links, the middle column is supposed to be the main content area, and the right column is supposed to contain a small news or advertisement section, but the problem I keep running into is that when I try to set the left sidebar cell (which I labeled ‘Danh mục’ or ‘Categories’) to a fixed percentage width like 15% of the whole table using the width attribute directly on the element, it does not appear to actually shrink or respect that percentage, because instead it expands and takes up way more horizontal space than expected, almost like 300 pixels wide or more, which completely throws off the alignment and makes the whole layout look unbalanced, and I have already tried several different adjustments such as changing the width attribute to 10% or even smaller values, trying to put the width on the or itself, and testing with or without other attributes like cellpadding or cellspacing, but no matter what I do the table cell for the category list still ends up being far larger than I want it to be, and I just cannot figure out why the browser is forcing that cell to be so wide, and it is becoming very frustrating because I only want to use HTML here without any CSS, and since I am a complete beginner who is still learning how HTML tables behave, this unexpected behavior is really bugging me and making me wonder if I am missing some fundamental rule about how table cell widths are calculated in HTML, so I would really appreciate if someone could explain in detail why the third row cell in particular seems to take so much space even when I explicitly put the width at 15%, and what exactly is causing this behavior in pure HTML without resorting to CSS.
(sr for the long paragraph to bypass the posting issue, i know it easy but i need an answer)