SShortSingh.
0
ProgrammingDEV Community ·

Hand-Rolled LRU Caches Can Leak Memory When Sized by Entry Count

A common LRU cache implementation limits capacity by number of entries, which ignores the real constraint of memory for items like decoded image thumbnails. The article recommends tracking a running byte budget and evicting from the least-recently-used end in a while loop, so a single large insert can free enough space. It also points out that using an ArrayDeque with remove(key) makes each access O(n), which can cause performance problems as the cache grows. The suggested fix pairs a hash map with a doubly linked list so that get and put run in constant time. The author notes these issues often surface only later as jank, so catching them early is the key skill.

0
IndiaTimes of India ·

Why Beer and Cola Come in Cans While Wine and Whiskey Come in Bottles

Packaging choices for drinks depend heavily on how each beverage needs to be preserved. Aluminum cans suit fizzy drinks such as beer and cola because they keep carbonation intact and shield the contents from light that can cause spoilage. Glass bottles are preferred for wine and whiskey since they provide greater chemical stability over time. Consumer tastes are changing, so buyers often balance storage needs against how they like to enjoy a drink. The goal is to pair each beverage with packaging that best protects its flavor.

0
IndiaNDTV ·

Delhi Air Quality Hits 'Severe' After Diwali Despite GRAP-III Curbs

Delhi's air quality deteriorated to 'severe' levels following Diwali celebrations. The worsening occurred even though authorities had already imposed Stage III restrictions under the Graded Response Action Plan (GRAP) on Friday. The article source provides limited detail beyond this point, so specific pollution readings and further measures are not reported here. The development highlights the continued challenge of controlling pollution in the capital during the festive period.

0
ProgrammingHacker News ·

Blog post offers a critique of the GPUI framework

A blog post titled 'A Critique of GPUI' was published on zortax.de and shared on Hacker News. The post examines weaknesses in GPUI, a GPU-accelerated UI framework. It drew 19 points and one comment on the Hacker News discussion thread. The provided material contains only the link and engagement metrics, so the specific arguments made in the critique cannot be confirmed from it.

0
IndiaNDTV ·

Sensex Slips 130 Points as Asian Markets Rebound; Brent Dips Below $98

Indian benchmark indices were trading lower, with the Sensex down about 130 points in live market updates. Asian markets moved higher in a rebound during the same session. Brent crude fell below $98 a barrel after recording its biggest weekly decline since 2020. The source article is a live-blog update, so it provides limited detail beyond these market movements and their immediate context.

0
IndiaTimes of India ·

Surat student wins national title with AI project estimating groundwater

Dheyay Shah, a school student from Surat, took the national title at vivo Ignite 2026. His winning project, JALAAKAR, uses machine learning to estimate groundwater availability. It draws on historical borewell records, rainfall data and soil information. The tool produces taluka-level estimates intended to help with water management decisions. The competition honoured 10 student projects from over 6,100 entries across India, covering areas such as water conservation, online security, road safety and assistive technology.

0
IndiaTimes of India ·

Chennai Open women's singles final pushed to Monday after rain and Diwali smoke

The women's singles final of the WTA 250 Chennai Open has been moved to Monday. Rain and smoke from Diwali fireworks caused the delays that forced the postponement. Defending champion Janice Tjen is set to face Poland's Magda Linette in the match. Separately, India's Vaishnavi Adkar and Rutuja Bhosale reached the women's doubles final, which is also drawing attention.

0
IndiaTimes of India ·

Calls grow for clear batting role for KL Rahul as keeper-batter debate continues

An opinion piece argues that India should settle on a defined role for KL Rahul. The article suggests that if the team views the wicketkeeper-batter as its number five batter for the World Cup, he should be given ownership of that spot now. It contends that the team should not rely on Axar Patel to fill that position. The piece frames the issue as one of clarity ahead of the tournament.

0
Crypto & Web3CoinDesk ·

Bitcoin dips then rebounds amid Nvidia cheating scandal and failed Iran talks

Bitcoin experienced sharp price swings that once again wiped out leveraged bullish bets worth millions of dollars. The volatility followed a drop before the price rebounded. Market sentiment was reportedly shaken by an Nvidia cheating scandal and the collapse of talks involving Iran. The article offers limited detail beyond these headline factors and the scale of the liquidations.

0
SportsESPNcricinfo ·

Ferguson out of last two ODIs vs India with calf tear; Henry cleared to return

Lockie Ferguson has been ruled out of the fourth and fifth one-day internationals against India. The New Zealand pacer is recovering from a calf tear. Matt Henry has been cleared to return to the side for the fourth ODI. The update was reported by ESPNcricinfo. The source article's secondary item about Clarke and Tickner's stand-down protocols is not covered here.

0
ProgrammingHacker News ·

The Qlobe: A Rotating Quine Art Piece from 2010

A 2010 blog post introduces the Qlobe, a rotating quine, which is a self-reproducing artistic or programmatic object. The article is shared on Hacker News, where it received 4 points and no comments at the time of capture. The source text provides little detail beyond the title and metadata, so specifics about the design and construction are not described. The post appeared on the blog mamememo.blogspot.com and was published in September 2010. Readers are directed to the original blog post for the full description.

0
IndiaTimes of India ·

Merz backs Ilse Aigner for Germany's presidency, which would make her the first woman in the role

German Chancellor Friedrich Merz has thrown his support behind Ilse Aigner ahead of Germany's upcoming presidential election. If she wins, Aigner would become the country's first female president. She is backed by the Christian Democratic Union and the Christian Social Union, along with support from several other parties. The post would become vacant when Frank-Walter Steinmeier's term concludes on March 18. Aigner brings prior government experience and an extensive political network within Germany.

0
IndiaTimes of India ·

Jody Fortson credits Travis Kelce with sharpening his route-running and football strategy

Jody Fortson has spoken warmly about the mentorship he received from Travis Kelce. He says Kelce helped deepen his grasp of route-running and overall football strategy. Fortson recalled visiting Kelce's home, where he picked up lessons on game preparation as well as the sport itself. Those sessions also included insights shared by Chiefs head coach Andy Reid. In March 2024, Fortson signed with the Miami Dolphins, aiming to apply what he had learned.

0
ProgrammingDEV Community ·

US LTL Freight Class Density Scale Changed in July 2025, Many Calculators Outdated

The National Motor Freight Traffic Association rewrote the density scale used to determine freight class for most US less-than-truckload shipments, effective July 19, 2025. The revised scale expanded from 11 to 13 density-based classes, and many commodities that once carried a fixed class now classify by density alone. The developer of CheckFreightClass reports that numerous online calculators still rely on the old table, some even producing a class 500 result that the current scale cannot generate. The article explains that density is calculated by dividing weight by volume, including pallets and overhang, and recommends classing each piece individually rather than blending densities. It also advises shippers to verify outputs against published test cases, since boundary values are where calculators most often diverge.

0
ProgrammingDEV Community ·

Flutter developers target jank-free 120Hz rendering with DevTools profiling and leak fixes

Modern 120Hz phones leave only about 8.3 milliseconds per frame, so even small delays cause visible stutter. Flutter splits work between the UI thread, which runs Dart logic and layout, and the raster thread, which sends draw calls to the GPU, and either exceeding the budget drops a frame. Developers are advised to profile on physical devices in Profile Mode rather than Debug Mode, using DevTools' frame chart, CPU profiler and timeline. The article highlights costly patterns such as saveLayer triggered by Opacity widgets, excessive rebuilds from top-level state changes, and repaints that RepaintBoundary can isolate. It also warns that uncancelled stream subscriptions and listeners can cause memory leaks that eventually stall the app.

0
ProgrammingDEV Community ·

Fixing nginx 'host not found in upstream' error in Docker

An nginx container in Docker can exit immediately with a 'host not found in upstream' error when the backend hostname cannot be resolved at startup. nginx resolves each proxy_pass hostname once when it launches, so it refuses to run if Docker's DNS cannot answer for that name. A test on Docker Engine 29.9.2 reproduced the failure, and the same error is widely reported in community forums. The main cause is that the backend container is not running or is not on the same user-defined network as nginx, since the default bridge network provides no container name resolution. Solutions include attaching both containers to one user-defined network, using the correct service name or alias, or adding a resolver directive to let nginx start without the backend and track IP changes.

← NewerPage 426 of 7347Older →