Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Coded Smorgasbord: Mostly In One Line

    Coded Smorgasbord: Mostly In One Line

    June 19, 2024

    Today’s a day for a smorgasbord. We’re going to start with a classic kind of bad code, from astephens:

    pbUpdates.Value = int.Parse(Math.Truncate(percentage).ToString());

    Here, we want to truncate a floating point down to an integer, but take a trip through a string to do it. Why? Probably because the person responsible knew about int.Parse but not how to actually cast.

    Thomas‘s predecessor had a solid idea of where exceptions come from:

    Try
    ‘ snip
    Catch ex As Exception
    Me.Response.Write(“error in my code “ & ex.ToString())
    Me.Write_error(ex)
    End Try

    I appreciate the honesty: your code is bad.

    Sylnsr wonders if this stored procedure has anything to do with generating reports?

    this.sqlDataSource1.SelectCommand = “rptGetVoidReportDataForReport”;

    Nah, couldn’t be- it says void in the name, so it obviously doesn’t return anything.

    Finally, Adam wonders exactly what is left to do on this one:

    pdfBytes = pdfConverter.GetPdfBytesFromUrl(urlToConvert); //TODO: This is the code we want to use.

    TODO? Or TODONE?

    [Advertisement]
    Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.

    Source: Read More 

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleSliTaz – Live CD operating system
    Next Article xpybar – highly extensible minimalistic dock panel

    Related Posts

    Machine Learning

    LLMs Struggle with Real Conversations: Microsoft and Salesforce Researchers Reveal a 39% Performance Drop in Multi-Turn Underspecified Tasks

    May 17, 2025
    Machine Learning

    This AI paper from DeepSeek-AI Explores How DeepSeek-V3 Delivers High-Performance Language Modeling by Minimizing Hardware Overhead and Maximizing Computational Efficiency

    May 17, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    10 Best Free Social Media Plugins for WordPress

    Learning Resources

    This AI Paper from Microsoft and Tsinghua University Introduces Rho-1 Model to Boost Language Model Training Efficiency and Effectiveness

    Development

    CVE-2023-53130 – Linux Kernel Block Device Exclusivity Leak

    Common Vulnerabilities and Exposures (CVEs)

    A Deep Dive into Small Language Models: Efficient Alternatives to Large Language Models for Real-Time Processing and Specialized Tasks

    Development

    Highlights

    Artificial Intelligence

    Can robots learn from machine dreams?

    November 19, 2024

    For roboticists, one challenge towers above all others: generalization — the ability to create machines…

    create-tsi: A Generative AI RAG Toolkit that Generates AI Applications using LlamaIndex with Low Code

    April 19, 2024

    Best Payment Reconciliation software

    April 25, 2024

    £3 million fine for healthcare MSP with sloppy security after it was hit by ransomware attack

    March 31, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.