SShortSingh.
0
ProgrammingDEV Community ·

How ShortSingh's pinned page comments stay attached to the right element across deploys

A developer describes a method for keeping client comments pinned to the correct element on a live website, even after deployments change its code. An early version relied on a single CSS selector per comment, which failed when build tools hashed class names, when layouts shifted, when lists re-rendered in a new order, and when scripts toggled state classes. The revised approach stores several independent identifiers for each pin, including a custom data attribute, a text fragment, a class-free path, and the click point as a fraction of the element's size. The lookup tries these identifiers in a fixed order, and each survives a different kind of change. The selector-building logic stops early at stable anchors such as element ids and test attributes, and it filters out classes that page scripts toggle dynamically.

0
ProgrammingDEV Community ·

Nextcloud Token Security Hinges on Key Custody, Not Token Volume

Nextcloud deployments often accumulate many authentication tokens, including browser sessions, client app passwords, and integration bearer tokens, each able to act as the user within its scope. The article argues that the real security question is whether a token can be revoked, what it can access, and where encryption keys are stored. Nextcloud stores hashes of tokens, but token records still hold identity and key material that needs protection. Some features, such as external storage, rely on a reversibly encrypted copy of the login password, so a token, the instance secret, and the database record together could expose that password. Administrators are advised to audit active tokens, retire stale ones, separate interactive sessions from unattended integrations, and treat backups containing all sensitive components as highly sensitive.

0
ProgrammingDEV Community ·

Stock lookups should check own properties to avoid inherited SKU false matches

A JSON stock record keyed by SKU can return a false match for a name like 'constructor', because the in operator also checks inherited properties from Object.prototype. The article recommends using Object.hasOwn() to confirm the record itself contains the requested key before reading its quantity. It presents a small Node.js helper that validates the input, returns a distinct missing result for absent SKUs, validates quantities, and leaves the input record unchanged. The author notes this applies only to parsed JSON stock objects, not arbitrary live objects or full warehouse responses. The example is a read-only lookup and does not describe a deployed or tested store integration.

0
ProgrammingDEV Community ·

Unprotected Web Forms Are Being Flooded by Bots; Free Turnstile Check Offers a Fix

Public sign-up and contact forms without bot protection are a frequent first target for spam scripts, which submit data to any form they find. The result can be fake accounts, junk messages, or an email provider's sending quota exhausted overnight. The article recommends adding Cloudflare Turnstile, a free and typically invisible verification tool, and checking its token on the server before saving any submission. It also promotes a free launch-check service from the author's company, which scans apps built with AI tools for launch-breaking issues.

0
ProgrammingDEV Community ·

Test AI-generated product images for text errors with automated checks, not visual review

The author argues that visually eyeballing AI-generated product artwork misses errors like wrong prices, which customers may spot first, and proposes treating renders like build artifacts. They ran identical prompts through GPT Image 2 and Nano Banana Pro on three e-commerce scenes, with 14 required text strings, and both models rendered all of them correctly. The main differences were speed, with Nano Banana Pro about four times faster, and file formats, with GPT Image 2 producing larger PNGs and Nano Banana Pro producing smaller JPEGs. The author recommends OCR-based assertions against declared required and forbidden strings, which can also detect regressions when a provider silently changes a model. The piece also covers retry classification, request timeouts, and editing features of each model.

0
IndiaTimes of India ·

Court Grants Sole Custody of Boy to Aunt After Mother's Death and Father's Rights Ended

The Supreme Court in West Virginia resolved a custody dispute involving a young boy whose mother had died and whose father's parental rights had been terminated. The boy had been raised by his maternal aunt, and the court placed priority on his emotional stability in granting her sole custody. The paternal grandparents were allowed to visit the child. A strict no-contact order barring the father was also put in place to safeguard the boy's welfare.

0
IndiaTimes of India ·

Drew Barrymore sells renovated New York estate for $4.5 million two years after buying it

Actress Drew Barrymore purchased a Colonial-style mansion in Harrison, New York, in 2024 for $4.4 million. Over the following two years she carried out a major renovation to update the home. The nearly 12-acre property now includes expansive living areas, a swimming pool, and a guest cottage. After listing it for just under $5 million, she sold the estate for $4.5 million.

0
IndiaNDTV ·

Iran Designates Argentina's Navy and Air Force as Terrorist Organisations

Iran has officially listed the Argentine Navy and Air Force as terrorist organisations. Buenos Aires has pushed back on the designation, pointing to the group's alleged involvement in the 1994 bombing of the AMIA Jewish community centre in the Argentine capital. That attack killed 85 people and wounded hundreds more. The article's source text offers limited detail beyond this background, so the stated reasons for Iran's move are not fully described. The dispute highlights the long-running tensions between Iran and Argentina over the AMIA case.

0
IndiaNDTV ·

Sukma's Shift From Left-Wing Extremism Shows Growth Through Expanded Education

Sukma district in Chhattisgarh, once affected by left-wing extremism, is seeing a development shift centered on education. Authorities have expanded schools, residential educational institutions and anganwadi centres across the area. These additions are giving children wider access to formal learning. The report presents the changes as a sign of hope for a region that has long faced conflict. The source article provides limited further detail on specific timelines or outcomes.

0
IndiaTimes of India ·

Canadian officials stress 72-hour household emergency preparedness

Canadian officials have restated the importance of residents preparing for interruptions to essential services. Public Safety Canada advises households to be able to manage for at least 72 hours. The guidance comes as concerns grow over severe weather and cyberattacks. Some experts recommend that families plan for a full week instead, given the risks. Officials maintained that the recommendation itself is not a new one.

0
WorldBBC World ·

Vinícius Jr sends surprise message to Sudanese boy who lost both legs in drone strike

Real Madrid forward Vinícius Jr has sent a surprise message to Zaher, a 13-year-old fan. Zaher lost both of his legs after being hit by a drone in Khartoum in 2024. The gesture was reported by BBC World alongside a video of the message. The footballer's outreach highlights the human toll of the conflict in Sudan on young civilians. Zaher received prosthetic legs following the injury.

0
StartupsProduct Hunt ·

⌘+L Appears on Product Hunt

A product titled ⌘+L has been listed on Product Hunt, the platform where makers share new tools and apps. The provided source material contains only the title and links to a discussion thread and an external link. No details about the product's purpose, features, creators, or launch date are available. Readers seeking more information would need to consult the Product Hunt listing directly.

0
StartupsProduct Hunt ·

AnyoneHiring.today Launches as a Product Hunt Listing

A product called AnyoneHiring.today has been posted on Product Hunt, where it is listed alongside a discussion thread and a link. The source material provides only the product name, a discussion link, and a reference link, without a detailed description of the product's features or purpose. Based on the available information, it is not possible to confirm what the service does or who it is designed for. Interested readers would need to consult the linked resources for further details.

0
SportsESPNcricinfo ·

Rahmat Shah becomes first Afghanistan player to break into ICC Test batting top 10

Afghanistan batter Rahmat Shah has made history by becoming the first player from his country to enter the top 10 of the ICC Test batting rankings. He has climbed six places to seventh position in the standings. His rise follows a knock of 173 runs against Zimbabwe. The milestone marks a notable achievement for Afghanistan's development as a Test-playing nation.

0
IndiaTimes of India ·

Sunetra Pawar says NCP merger details will be shared at the appropriate time

Maharashtra leader Sunetra Pawar addressed speculation about a possible merger involving the Nationalist Congress Party. She indicated that the relevant information would be made public when the time is right, declining to offer specifics at present. Her remarks came amid ongoing public and political conjecture about the party's future alignment. The article attributes the comments to Pawar in response to media questions on the subject. No further concrete details about the timing or terms of any merger were provided in the report.

0
IndiaNDTV ·

Sonia Gandhi Says 1984 Intelligence Warning Led to Rahul and Priyanka Leaving School

Sonia Gandhi has said that a security alert from 1984 prompted the withdrawal of her children, Rahul and Priyanka Gandhi, from their residential schools. The warning was issued by a former intelligence chief who had served as a security adviser to then Prime Minister Indira Gandhi. He concluded that the two children could no longer be adequately protected while living at their schools. The assessment reflected the heightened security concerns of that period for the Gandhi family. The account is based on Sonia Gandhi's own remarks as reported by NDTV.

0
IndiaTimes of India ·

Former hockey captain MM Somaya recovers his stolen 1980 Olympic gold medal

Former Indian hockey captain MM Somaya has got back his 1980 Olympic gold medal, which had been stolen from his home. Bengaluru Police arrested two suspects during the investigation, even though little evidence was available at the start. Somaya expressed gratitude for the officers' persistence in the case. He said the medal holds deep personal meaning, representing his passion for the sport and years of dedication. His recovery of the medal has been described as a moment of great emotional significance.

← NewerPage 312 of 7338Older →