Random snippets of all sorts of code, mixed with a selection of help and advice.
How to print in python without using print function?
31 December 2025 @ 11:58 am
How to print in python without using print function? The print function is boring. Use a different method. I have tried to do so. But nothing worked.
Select the associated bill number or bill type
31 December 2025 @ 11:56 am
passing the payload below mentioned to the api https://www.zohoapis.com/books/v3/vendorcredits?organization_id=10234695 and getting error as
Status Code: 400 Response: {'code': 37034, 'message': 'Select the associated bill number or bill type.'}
i dont have bill_id to pass so how i fix that error
payload = {'vendor_id': '1610946000002479040', 'line_items': [{'description': 'Quality Adjustment', 'quantity': 1.05, 'rate': 1000.0, 'item_id': '1610946000000746068'}, {'description': 'Quality Adjustment', 'quantity': 1.05, 'rate': 1000.0, 'item_id': '1610946000000746068'}], 'date': '2025-12-29', 'vendor_credit_number': 'C26MH303', 'notes': 'https://dev.d3gyl5ge7aanpk.amplifyapp.com/operations/bills_and_invoices/439/',
}
Define a variable, static_cast [closed]
31 December 2025 @ 11:49 am
How should a variable be properly defined in C++? Is there an important difference between writing int a = 10; and int a{10};? Also, could someone explain the difference between (char)a and static_cast<char>(a), and when each form should be used?
AdMob linked AdSense account asking to connect a site, and no “Manage payment methods” option visible
31 December 2025 @ 11:48 am
I have an Android application using Google AdMob.
In the AdMob console → Payments section, it shows:
Payments account: AdSense (India)
When I log in to the linked AdSense account, I see the message:
“To start earning from AdSense, you need to add your payment info and connect your site.”
However:
I do not run any website
I am only monetizing an Android app via AdMob
I do not want to show ads on a site
I understand that AdMob uses AdSense for payouts, but I am confused about the following:
Is it mandatory to connect a website in AdSense for AdMob-only publishers?
In AdSense → Payments, I do not see “Manage payment methods”.
I only see limite
How to convert a ROS1 bag file to a ROS2 bag file
31 December 2025 @ 11:46 am
I have a ROS1 bag file, but the code I’m working with is in ROS2. I want to convert the ROS1 bag file to a ROS2 bag file. Could anyone help me with this conversion process? Any guidance or examples would be greatly appreciated!
Thanks in advance!
How does Nessus detect and manage network vulnerabilities?
31 December 2025 @ 11:37 am
Introduction to Nessus Vulnerability Scanner
Millions of software applications are released each year across various operating systems, many of which may contain vulnerabilities that could allow hackers to breach networks. Nessus Vulnerability Scanner, developed by Tenable, is a powerful tool for identifying and managing network vulnerabilities. With professional search algorithms and high accuracy, it provides results with minimal false positives, and its modular architecture includes servers and agents for effective reporting and management.
enter image description here
Versions and Capabilities
Nessus is available in two main editions: Nessus Home for personal use with limited features, and Nessus Professional for ente
How can I debug Aiken smart contracts when they fail, and what is the best practice to connect them to a frontend?
31 December 2025 @ 11:32 am
I am currently learning Aiken for writing Cardano smart contracts, and I am facing difficulties when a contract does not behave as expected. In many cases, the contract either fails to compile or fails during validation, and it is not always clear what the root cause is or how to debug it effectively.
I would like to understand practical and reliable ways to debug Aiken contracts, especially in situations where:
The compiler reports type or logic errors that are not obvious
A validator fails during transaction validation
The script behaves differently once tested or used in a real transaction
In addition, I am working with a web-based frontend using plain HTML, CSS, and JavaScript, and I would like guidance on how Aiken smart contracts are typically connected to such a frontend in real-world projects. Specifically:
What is the recommended arc
Rust and C++ FFI: orchestrating destructors/drops of struct fields
31 December 2025 @ 11:11 am
Because of some FFI code interacting with C++ I need precise manual control on when the Drop::drop() method of types is called w.r.t. those of fields.
To be more precise:
When a C++ struct is destroyed, the destructor is called (T::~T()) and then the fields are destructed in reverse declaration order.
When a Rust struct is dropped, Drop::drop() is called, and then the fields are dropped in declaration order.
If we ignore the different drop order of the fields the mechanisms are quite similar, so T::~T() in C++ has the role of Drop::drop() in Rust.
So suppose I have a struct in Rust:
#[repr(C)]
pub struct MyStruct {
field: AnotherStruct
}
#[repr(C)]
pub struct AnotherStruct {
something: *mut i32
}
impl Drop for MyStruct {
// ...
}
impl Drop for AnotherStruct {
// ...
}
On the C++ side I can
Should I keep or disable compiler extensions?
31 December 2025 @ 10:34 am
I'm new here, so pardon me if my question doesn't belong here, or if it has been asked before.
I asked ChatGPT and got the response:
"The recommendation depends on whether you want strict standards compliance or extended functionality.
Generally:
Keep enabled if you want extra features, optimizations, or convenience that the extension provides.
Disable if you want strict adherence to the standard (e.g., C++ standard) and better portability across compilers.
Once you clarify the environment, I can give a more precise, step-by-step recommendation."
I don't understand. One option must be recommended over the other, no?
Algorithm find specific cells in binary matrix
31 December 2025 @ 9:38 am
In a boolean matrix there are patterns of connected cells filled with "1". The rest is filled with "0".
The goal is to get a list of cells with the red "1"s - see image attached.
For now the solution uses a repeated floodfill to identitify and separate the patterns. Now I am stuck with finding the red marked cells. There is no issue if the problem is broken down to a single pattern only as they are available anyways. Also computational effort is not a big issue here as the matrix size is only 8 x 8.
I wonder if there is an existing algorithm out there which can be used to solve this problem.
Any ideas?
Many thanks in advance

