Skip to main content

Posts

Pyside 6

Exploring PySide 6 PySide 6 is the official set of Python bindings for the Qt 6 framework. It allows developers to build cross-platform desktop applications with modern UIs using Python. With PySide 6, you can access Qt’s powerful widgets, layouts, and graphics capabilities while writing concise, Pythonic code. Some highlights of PySide 6 include: Support for Qt 6’s latest features and modules Cross-platform compatibility (Windows, macOS, Linux) Integration with QML for declarative UI design Strong community and official backing from The Qt Company If the preview doesn’t load, you can open the document directly in Google Drive: Click here to view .

Firebase in rust

// Minimal Firestore integration smoke test. // This test compiles and runs under `cargo test`. It will attempt a small // credentials check when `GOOGLE_APPLICATION_CREDENTIALS` is set, otherwise // it will print a message and return immediately (so CI without credentials // doesn't fail). #[cfg(test)] mod tests { use std::env; // Use the tokio test runtime which is already a dependency in the project. // Minimal Firestore integration tests. // Tests will skip when `GOOGLE_APPLICATION_CREDENTIALS` is not set. #[tokio::test] async fn firestore_smoke_credentials_check() { if let Ok(path) = env::var("GOOGLE_APPLICATION_CREDENTIALS") { // If the credentials env var is set, ensure the file is readable. match tokio::fs::metadata(&path).await { Ok(meta) => { assert!(meta.is_file(), "GOOGLE_APPLICATION_CREDENTIALS is not a file"); } ...

Roman Number to Integer

This website describe common assumption and failure during gfg coding. python Failed class Solution: def romanToDecimal(self, s): # code here val={ '':1, 'X':10, 'L':50, 'M':1000, 'C':100, 'V':5 } sum=0 s=s[::-1] count=0 for i in s: if count==1: count=0 sum-=val[i] else: sum+=val[i] count+=1 return sum Reason Your current implementation of `romanToDecimal()` has the right spirit, but the logic for subtractive notation (like `IV`, `IX`, `XL`, etc.) is off. You're using a `count` flag, which doesn't reliably detect when subtraction should occur. --- ⚠️ Issues: 1. Incorrect subtraction logic : Roman numerals subtract only when a smaller value precedes a larger...

Balancing brackets

we are going to make the logic for isbalanced function correct.This article is part of my efforts where i have made many mistakes while thinking about problem solution which iam just recording over here.Finally i will also have the correct anwser in the same language.As it is self explanatory no Explantion. Test Case 1 Python Failure class Solution: def isequal(self,f,s): ok=[['(',')'], ['[',']'], ['{','}'], ] for i in ok: s=s.replace(i[1],i[0]) if f==s: return True else : return False def isBalanced(self, s): # code here s=s.strip() s.replace(" ","") n=len(s) #should be even if n%2!=0: return False m=n//2 f=s[:m] t=s[m:] t=t[::-1] return self.isequal(f,t) My above program got fa...

Longest unique substring

  Test Case 1 In the brute-force approach to generating substrings using nested loops, maintaining a hashmap that counts each character's occurrence as 1 (e.g., setting counts to 1 regardless of actual frequency) is invalid. Proper substring generation and validation require accurately tracking character counts in the hashmap rather than assuming all characters occur only once. geekforgeeks eekforgeeks ekforgeeks kforgeeks forgeeks orgeeks rgeeks geeks eeks eks ks s Test Case 2 From the following output, what we actually need is a contiguous substring of characters that satisfies our problem constraints. For example, in the second case, the longest substring without repeating characters is 'ksforg' or 'stoare'—these substrings are contiguous and contain no repeating characters. geekforgeeks eekforgeek ekforgee kforge forg or o Test Case 3 We can use a fixed-size sliding window to find substrings. Starting with a window of fixed size, we keep decreasing the w...