StackOverflow.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (13 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

Unable to run macrobenchmark test with StartupMode.Cold

30 November 2025 @ 12:22 pm

so i've tried running my own macrobenchmark, also with the android/samples and they both fail on StartupMode.Cold with the following error java.lang.IllegalStateException: The DROP_SHADER_CACHE broadcast was not received. This most likely means that the androidx.profileinstallerlibrary used by the target apk is old. Please use1.3.0-alpha02or newer. For more information refer to the i still get it even after adding profileinstaller dep and adding it to the manfiest

Аllow users from specific Google Groups to log in to Jenkins

30 November 2025 @ 12:16 pm

I’m using the Google Login Plugin in Jenkins, and I want to allow access only to users who belong to certain Google Groups. My setup: I have enabled the Google Directory API (Admin SDK → Directory API) so the plugin can read group membership. Jenkins is configured with Role-based Authorization Strategy. I see that PR is still open for groups but still asking - LINK TO PR The problem: I do not see any groups appear in Jenkins, and users who are members of these Google Groups cannot log in or do not get assigned to the expected roles. My questions: ✔ How can I verify whether the Google Login Plugin is actually retrieving Google Groups? ✔ What is the correct way to use

Why is my instance variable not updating inside a Python class?

30 November 2025 @ 12:15 pm

I am learning OOP in Python. I created a class and tried to update an instance variable inside a method, but the value doesn’t change. class Student: def __init__(self, name, marks): self.name = name self.marks = marks def update_marks(self, value): marks = value # not updating self.marks ? s = Student("Shivam", 80) s.update_marks(95) print(s.marks) # still prints 80

Packet corruption in Lockless ring buffer (multiple producer, single consumer)

30 November 2025 @ 12:15 pm

I Am implementing Lockless ring buffer for multiple producer and single consumer (keeping in plan to extend it to multiple produce and consumer) using design reference of dpdk buffer : https://doc.dpdk.org/guides/prog_guide/ring_lib.html Implementation: struct ringbuffer{ _Atomic(void *) start_addr; //start address entry _Atomic(void *) end_addr; // end address entry unsigned int max_entry; // Maximum messages allowed in buffer unsigned int msg_size; // One message size unsigned int entry_count; // Current entries in the ring buffer _Atomic(void *) read_addr; // read address to read message _Atomic(void *) read_tail_addr; // read tail. _Atomic(void *) write_addr; // write address to write message _Atomic(void *) write_tail_addr; // write tail }; void* ringbuffer_init(unsigned int msg_size,unsigned in

using GDrive link as html base - http 400

30 November 2025 @ 12:11 pm

I try to use <base href="myDriveLink" /> to redirect relative page refs like <a href="test.html" /> to files stored in the Google Drive. I am user and owner. In any attempt I get http 400 error. TIA, Robert.

Formatting c++ source code contained in a string and pdf conversion with nbconvert

30 November 2025 @ 12:08 pm

In jupyter-lab, it is easy to format code in a markdown cell, e.g. ```c++ int main() { return 0; } Then, in a code cell, one can convert it in pdf with nbconvert !jupyter nbconvert "test.ipynb" --no-input --to pdf However, if the code to be formatted is contained in a python string (coming from a file for instance), one has to handle this string in a code cell which makes the problem trickier. I managed to use pygments which correctly produce an HTML output as the result of the code cell: from pygments import highlight from pygments.lexers import get_lexer_by_name from pygments.formatters import HtmlFormatter from IPython.core.display import HTML src = """ int main() { return 0; }""" htmlresult = highlight(src, get_lexer_by_name("c++"), HtmlFormat

Why is my HTML button not responding when I click it?

30 November 2025 @ 12:05 pm

I created a simple button in HTML: <button onclick="show()">Click Me</button> <script> function show(){ alert("Hello"); } </script> But when I click the button, nothing happens. Is there something wrong in my code or browser? How can I fix this?

Regression analysis

30 November 2025 @ 11:29 am

How should I handle a mass-point in the dependent variable when running OLS regression in R? I’m working with a a household expenditure dataset (Living Costs 2019) where the dependent variable is the weekly combined gas and electricty bill. One issue is that about 40% of the 5008 households report the exact same value: £2.2428 per week. All of these cases correspond to households whose payment method is coded as “Not Direct Debit”. For these households the energy expenditure variable has no variation at all — all values are £2.2428. Despite these records showing the same figure, they are distinctly different, with different characteristics for the rest of the 30ish variables they have. My current plan is to estimate two models: Full sample OLS model (all households, including the mass-point) Restricted sample OLS model (excluding all households where expenditure = £2.2428) The idea is that the

Problem using PHP extension on Apache24 on Windows

30 November 2025 @ 9:45 am

I'm running Apache24 with PHP enabled to use the Kanboard app. Everything works fine, but if I remove the path to the PHP folder from the Windows PATH, I get an error when loading the localhost/kanboard page: Internal Error: PHP extension required: pdo_sqlite Pages with php.info are loaded correctly. The path to extension_dir in the php.ini file is absolute. The path to PHPIniDir in the httpd.conf file is absolute as well. Apache24 error.log shows: PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo_sqlite.dll' (tried: D:\\programs\\php_8.4.15\\ext\\php_pdo_sqlite.dll(\xd0\x9d\xd0\xb5\xd0\xbd\xd0\xb0\xd0\xb9\xd0\xb4\xd0\xb5\xd0\xbd\xd1\x83\xd0\xba\xd0\xb0\xd0\xb7\xd0\xb0\xd0\xbd\xd0\xbd\xd1\x8b\xd0\xb9\xd0\xbc\xd0\xbe\xd0\xb4\xd1\x83\xd0\xbb\xd1\x8c), D

C memory initialization for a char** after a malloc

29 November 2025 @ 8:04 pm

I've been researching this for a day and I've found a lot of conflicting information on multiple websites. I'm writing a simple test that will allocate and initialize a char** (array of strings, char*). I've distilled the code down to the relevant parts below. I'm running this on Linux with Eclipse IDE for C/C++. I do realize that I could just create a simple char arr[rows][cols]; of whatever size but I want this test to create dynamic memory on the heap. After the char** arr malloc, I've read to do multiple things and I can't tell which is one right or wrong because even running with Valgrind, I get no errors. Therefore, what is the best practice way to accomplish the questions inline with the code below? void init_str_list(uint size) { if (size == 0) { fprintf(stderr, "Cannot allocate an array of size 0."); return; } // Allocate enough memory plus the NULL of the list array. char*