Templates just got cleaner. ✨ Stop writing manual encoding logic in your components. Use the new URI pipes in ngx-transforms: <!-- Before --> <a [href]="sanitize(val)">Link</a> <!-- After --> <a [href]="val | encodeURIComponent">Link</a> Native performance, fully tree-shakeable. GitHub: https://lnkd.in/dRYZts_V #Angular #Coding #OpenSource
More Relevant Posts
-
🚀𝐋𝐞𝐞𝐭𝐂𝐨𝐝𝐞 𝐏𝐫𝐨𝐛𝐥𝐞𝐦 𝐒𝐨𝐥𝐯𝐞𝐝: 𝐌𝐞𝐫𝐠𝐞 𝐍𝐨𝐝𝐞𝐬 𝐢𝐧 𝐁𝐞𝐭𝐰𝐞𝐞𝐧 𝐙𝐞𝐫𝐨𝐬 Solved a very interesting Linked List problem that focuses on pointer manipulation and in-place modification 🔍 𝐏𝐫𝐨𝐛𝐥𝐞𝐦 𝐒𝐭𝐚𝐭𝐞𝐦𝐞𝐧𝐭: Given a linked list where: • The list starts and ends with 0 • Between every pair of 0s, there are some positive integers 👉 Merge all nodes between two 0s into a single node whose value is the sum of those nodes. 💡𝐊𝐞𝐲 𝐈𝐧𝐬𝐢𝐠𝐡𝐭: Instead of creating a new list, we can: 👉 Use the existing nodes and modify them in-place This makes the solution more efficient in terms of space. ⚙️ 𝐀𝐩𝐩𝐫𝐨𝐚𝐜𝐡 𝐈 𝐔𝐬𝐞𝐝: 1. Use Two Pointers: • slow → points to position where result will be stored • fast → traverses the list 2. Traverse the List: • Keep adding values to sum until we hit a 0 3. When Encountering 0: • Assign sum to slow->val • Move slow forward • Reset sum to 0 4. Track Last Valid Node: • Keep pointer newLastNode to end the final list properly 5. Terminate the List: • Set newLastNode->next = NULL 🧠 𝐖𝐡𝐲 𝐓𝐡𝐢𝐬 𝐖𝐨𝐫𝐤𝐬: We reuse the original list nodes instead of allocating new memory. Each segment between zeros is compressed into a single node efficiently. 🧾 𝐂𝐨𝐫𝐞 𝐋𝐨𝐠𝐢𝐜: if(fast->val != 0){ sum += fast->val; } else{ slow->val = sum; slow = slow->next; sum = 0; } 📈𝐂𝐨𝐦𝐩𝐥𝐞𝐱𝐢𝐭𝐲: • Time Complexity: O(n) • Space Complexity: O(1) ✨ 𝐖𝐡𝐚𝐭 𝐈 𝐋𝐞𝐚𝐫𝐧𝐞𝐝: • In-place modification can optimize space • Two-pointer technique is very powerful • Always track the end of the new list carefully 🔥 Practicing more Linked List problems to strengthen fundamentals! #LeetCode #DSA #LinkedList #Coding #CPP #ProblemSolving #Algorithms
To view or add a comment, sign in
-
-
🚀 Mastering a Classic Algorithm: Balanced Parentheses (Stack – LIFO) Today I revisited a fundamental problem that every Software Engineer should understand: validating balanced parentheses using a stack. Why it matters: This pattern appears in compilers, interpreters, and even real-world applications like expression parsing. Here’s the idea: 👉 Use a stack (LIFO) 👉 Push opening brackets 👉 Pop and match when encountering closing brackets 👉 Ensure the stack is empty at the end Clean and efficient JavaScript implementation 👇 This is a great reminder that mastering data structures like stacks is key to solving real algorithmic problems efficiently. I’m currently building and documenting algorithm patterns here: 🔗 https://lnkd.in/ej4fNeZs #SoftwareEngineering #JavaScript #Algorithms #DataStructures #Coding #LeetCode #100DaysOfCode
To view or add a comment, sign in
-
-
Ever struggled with refactoring a massive codebase 🤯, feeling like you're navigating a maze? I've been there too. In my previous team, we had to refactor a legacy project, and it was a nightmare. But then we discovered the power of Regex in VS Code. It's a game-changer. Here's a rule of thumb: always use Regex to find and replace patterns in your code. However, beware of the pitfall of over-relying on Regex, as it can lead to performance issues. Stay vigilant and use it wisely. With great power comes great responsibility, so use Regex to refactor your code like a pro. #programming #webdev #refactoring
To view or add a comment, sign in
-
-
I just returned false on a LeetCode problem… and it passed ALL 67 test cases. No loops. No base conversions. No palindrome checks. Just one line: return false; And it got accepted instantly. The problem? 2396. Strictly Palindromic Number You had to check if a number n is a palindrome in every base from 2 to n-2. Sounds brutal, right? Then I actually read the problem properly. Here's the mind-blowing part: For any n ≥ 4, when you convert it to base (n-2), it always becomes "12". n=5 → base 3 → "12" n=6 → base 4 → "12" n=10 → base 8 → "12" "12" is never a palindrome. So it's mathematically impossible for any number ≥ 4 to be strictly palindromic. For n=1,2,3 the base range is invalid anyway. The answer is always false. The entire "hard" problem collapses into a single line of code. Lesson for every developer: Before you write clever code, ask yourself: Is this problem even possible? Sometimes the best solution isn’t optimized algorithms. It’s pure elimination. O(1) thinking. Read the problem. Really read it. #LeetCode #ProblemSolving #SoftwareEngineering #Coding #DSA #BackendEngineering #CodingInterview #DeveloperMindset #CleanCode
To view or add a comment, sign in
-
-
Kimi launches K2.6 for open-source coding Kimi unveiled K2.6, a new open-source coding model built for long-running engineering tasks and autonomous agents. • Scores SOTA on key benchmarks like SWE-Bench Pro, BrowseComp, and Math Vision. • Handles 4,000+ tool calls and can run for 12+ hours continuously. • Works across Rust, Go, Python, frontend, DevOps, and optimization tasks. • Upgrades agent swarms to 300 parallel sub-agents managing 100+ files from one prompt. • Stronger frontend generation with WebGL, GSAP, Framer Motion, and Three.js. • Powers always-on agents like OpenClaw and Hermes. Open-source AI is moving beyond copilots into fully autonomous software teams. https://lnkd.in/dDSwawvb
To view or add a comment, sign in
-
-
Day 36 of My DSA Journey Today I solved LeetCode 150 – Evaluate Reverse Polish Notation (RPN) on LeetCode. 📌 Problem Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are: +, -, *, / Each operand may be an integer. Example: Input: ["2","1","+","3","*"] Output: 9 Explanation: (2 + 1) * 3 = 9 🧠 Approach – Stack This problem is a perfect application of the Stack data structure. Steps I followed: • Traverse the tokens array. • If the element is a number → push it onto the stack. • If it is an operator: Pop the top two elements (a and b) Perform the operation (a operator b) Push the result back into the stack • At the end, the stack contains the final result. ⏱ Time Complexity: O(n) — We process each token once 📦 Space Complexity: O(n) — Stack to store operands 💡 Key Learnings ✔ Understanding Reverse Polish Notation (Postfix Expression) ✔ Applying stack for expression evaluation ✔ Handling operator precedence implicitly using stack This problem connects DSA with compiler/interpreter concepts, which makes it even more interesting 🚀 Consistency continues — improving every day 💪 #100DaysOfCode #DSA #Stack #LeetCode #Java #ProblemSolving #CodingJourney #DeveloperJourney #Programming #SoftwareEngineering
To view or add a comment, sign in
-
-
Solved a classic Binary Tree problem: constructing a tree from preorder and inorder traversals. Interestingly, building the tree structure on paper felt almost obvious—pick the root, split left and right, and repeat. But implementing the same logic in code required careful handling of recursion and index boundaries. Used a hashmap to optimize lookups and achieve O(n) time complexity. Key takeaway: translating intuitive understanding into efficient code is where real problem-solving skills develop. #DSA #BinaryTree #Recursion #ProblemSolving #Coding
To view or add a comment, sign in
-
-
🎯 AI CHEAT CODE #018 🎯 Cursor IDE has a feature that makes refactoring feel like CHEATING 🃏 The Composer + Codebase feature that changed how I work forever: Step 1: Open Cursor IDE (cursor.sh — free tier available) Step 2: Press Cmd/Ctrl + I to open Composer Step 3: Click "Add Context" → Select entire folders or @codebase Step 4: Type: "Refactor all API calls in this project to use async/await instead of .then() chains. Update error handling too." Step 5: Preview ALL changes across MULTIPLE files before accepting Step 6: One click to apply everyt hing OR reject specific files Before Cursor: 2 hours of manual find-replace + testing After Cursor: 4 minutes. Done. Tested. Ship it. 🚢 The magic? It UNDERSTANDS your code architecture, not just text patterns. It knows changing one file might break another — so it fixes both! ⚡ Pro Tip: Use @Docs to add official documentation: "Use the latest React 19 patterns from @Docs when refactoring this component" It follows exact API specs — no hallucinated methods. Are you still doing manual refactoring? Let's talk in the comments 👇 #CursorIDE #AI #Coding #Refactoring #DeveloperProductivity #JavaScript #SoftwareEngineering #DevTools
To view or add a comment, sign in
-
🚀 AI CHEAT CODE #021 🚀 Most devs use Cursor IDE like a fancy autocomplete. Power users? They're treating it like a pair programmer who never sleeps. 🤫 Here's the setup that 10x'd my coding speed: Step 1: Open Cursor and press Cmd+K (Ctrl+K on Windows) anywhere in your code Step 2: Instead of asking it to "fix this function", try: "Rewrite this function to be more performant, add proper error handling, and follow SOLID principles" Step 3: Use Cursor's Composer (Cmd+Shift+I) for multi-file edits: "Refactor the authentication logic across all files to use JWT tokens instead of sessions" Step 4: Add your coding standards to a .cursorrules file: - Always use TypeScript strict mode - Add JSDoc comments to all public functions - Use async/await, never callbacks - Follow the repository pattern Now Cursor follows YOUR style on every suggestion! 🎯 ⚡ Pro Tip: Use @codebase in your prompt to give Cursor full context of your entire project. It'll make suggestions that actually FIT your architecture — not just generic code! This alone saved me 3+ hours of code review feedback loops every week. Drop a 🚀 if you're already using Cursor! What's your favorite Cursor trick? #AI #CursorIDE #Coding #DevProductivity #SoftwareEngineering #AITools #CloudComputing #DevOps
To view or add a comment, sign in
-
*sigh* I didn't want to believe it but Codex and GPT 5.5 really is better at coding. All my context is in Claude and the though of transitioning everything over burned me out. Luckily the solution is simple, Claude Code and Codex both open, pointing to the same folders. It's like having a front end engineer (Claude) and a back end engineer (Codex) working with the same context. When one screws up I ask the other to check. But lately it's usually Claude screwing up and Codex coming to the rescue.
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development