on-internet

Is it safe to ignore PHPCS sanitization warning for $_FILES['tmp_name'] in WordPress?

I am handling file uploads in WordPress and have this code snippet: 'tmp_name' => $_FILES['attachments']['tmp_name'][$key], // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized PHP_CodeSniffer flags this with a security warning about unsanitized input, but I added an ignore comment because: tmp_name is generated by the PHP runtime (not user-provided directly). It is used internally by move_uploaded_file(), which handles the filesystem path safely. My questions are: Is this ignore justified, or are there hidden security risks with $_FILES['tmp_name'] that require sanitiz

Join the discussion →

Why does pytrends return different values than Google Trends UI even after normalization?

I'm using the pytrends Python library to collect interest-over-time data for a list of movies from multiple countries. However, the values I get in the resulting DataFrame are often different from what I see in the Google Trends web interface, even though the timeframe, region, and keywords are exactly the same. I'm using classic movie titles (e.g., Casablanca, Gone with the Wind) across the US, France, and the UK with a 5-year timeframe ('today 5-y'). I’m also setting custom headers to avoid 429 errors. What I expect The values in the CSV to be the same as in the Google Trends UI for the same

Join the discussion →

Why doesn't MATLAB's isosurface show all faces of this solid?

I'm trying to plot/visualize the following solid: This is what I coded so far: % Create the set of 3D points n = 150; x = linspace(1, 2, n); y = linspace(0, 1, n); z = linspace(0, 1, n); [X, Y, Z] = meshgrid(x, y, z); % Create 3D logical mask for the volume mask = (1 <= X) & (X <= 2) ... % Constraints of x & (0 <= Y) & (Y <= 1./X) ... % Constraints of y & (0 <= Z) & (Z <= sqrt(Y)); % Constraints of z figure; isosurface(X, Y, Z, mask, 0.5); daspect([1 1 1]); view(3); grid on; xlabel('x'); ylabel('y'); zlabel('z'); title('Isosurface visualization of the solid volume'); But the result only shows

Join the discussion →

minecraft 1.16.5 Datapack smelting recipe type only working if forge is installed despite not using forge tags

I'm making a datapack for 1.16.5 minecraft. I want it to be compatible with both vanilla and forge. I made smelting and blasting recipes and they only work in forge (I removed all other mods to test this). The recipes do not contain forge tags, only the mods tags. The other crafting recipes work fine. It's made in mcreator and i'd like to avoid using code modification since I need to port it to 1.18.2 and locked code gets reset when you do that. I want my recipe to work in vanilla. https://filebin.net/a8lgkdxe77r1195s/moreTaggedRecipies%2016%20alpha%207.67.zip { "type": "minecraft:smelting", "

Join the discussion →

minecraft 1.16.5 Datapack smelting recipie type only working if forge is installed despite not using forge tags

I'm making a datapack for 1.16.5 minecraft. I want it to be compatible with both vanilla and forge. I made smelting and blasting recipes and they only work in forge (I removed all other mods to test this). The recipes do not contain forge tags, only the mods tags. The other crafting recipes work fine. It's made in mcreator and i'd like to avoid using code modification since I need to port it to 1.18.2 and locked code gets reset when you do that. I want my recipe to work in vanilla. https://filebin.net/a8lgkdxe77r1195s/moreTaggedRecipies%2016%20alpha%207.67.zip { "type": "minecraft:smelting", "

Join the discussion →

Azure Devops picking the "wrong" sprint to show in Sprint board

I have an issue with Azure Devops. We've fairly recently switched to using SAFe (Scaled Agile Framework for Enterprises), and so now we're doing all our planning in 3-month increments, with 6 iterations of 2 weeks each in each increment. This now means our project structure in terms of iterations is hierarchical, and looks something like this: Iteration Runs from/to ------------------------------- PI 5 May 5 - Jul 25 IT 5.1 May 5 - May 16 IT 5.2 May 19 - May 30 IT 5.3 Jun 2 - Jun 13 IT 5.4 Jun 16 - Jun 27 IT 5.5 Jun 30 - Jul 11 IT 5.6 Jul 14 - Jul 25 The problem arises when trying to show the

Join the discussion →

striped pattern as background in html css by use background-image repeating-linear-gradient

Is it possible with CSS background-image repeating-linear-gradient to create such a pattern? Such stripes composed of only two colors are possible. But I need a 5 color pattern. Black, Red, Green, Blue and White in spacing and sequence as shown in the attached image. I purposely showed the colors like this to make it easy to see what I mean. In the target scheme they will be different shades of gray. Each stripe is 1px, white spaces 4px. The whole pattern is to be 60px wide. Is it possible with CSS background-image repeating-linear-gradient or in another CSS way but such that it would be a bac

Join the discussion →

Using HDFql to filter out groups that have specific attribute values

I am trying to use the HDFql C++ library to select groups that have attributes with specific values. There are an arbitrary number of groups in the root group, and each group has the same attribute names but possibly different values. For example, I might have two groups, group1 and group2, and each group has two attributes, attribute1 and attribute2. The values for the groups and attributes might be, group1 attribute1 is "Water" group1 attribute2 is "Database1" group2 attribute1 is "Water" group2 attribute2 is "Database2" I would like to form a query to select the group that has attribute1 se

Join the discussion →

Is there a way to get normal output from electron-forge commands?

We have recently added some Electron apps into our application suite, and these are being packaged up with the command electron-forge package. Unfortunately, it looks like that command is doing all sorts of wonderful output manipulation to make it look nice in a terminal, for example: > electron-forge package ✔ Checking your system ✔ Preparing to package application ✔ Running packaging hooks ✔ Packaging application ✔ Packaging for x64 on win32 [7s] ✔ Running postPackage hook It's almost certainly pushing out \r characters to dynamically update the same line, examples being: ✔ Current time take

Join the discussion →

Simulink infusion pump model with PID controller runs very slowly

I'm trying to implement a PID controller for the attached system, where I have a transfer function that gives me the concentration of the neuromuscular drug, and then, through Hill's equation, I obtain the neuromuscular blockade percentage given that I'm aiming for an NMB of 10% as the desired output. But it's running very slowly with T ≈ e−107. How should I tackle this issue or restructure this model? P.S. After using either ode15s or ode23s, it showed the following message: Derivative of state '1' in block 'Transfer Fcn' at time 2.6309053879766232E-108 is not finite. The simulation will be s

Join the discussion →

ACTION_VIEW + queryIntentActivities with YouTube url does not show youtube app

I try to query all apps that can handle a link like following: https://youtube.com/watch?v=... Here's my function: private fun findAppsToOpenLinks(context: Context, url: String): List<ResolveInfo> { val intent = Intent(Intent.ACTION_VIEW).apply { data = url.toUri() } val list = if (Build.VERSION.SDK_INT >= 33) { context.packageManager.queryIntentActivities( intent, PackageManager.ResolveInfoFlags.of(PackageManager.MATCH_ALL.toLong()) ) } else { context.packageManager.queryIntentActivities(intent, 0) } return list } In return, I get some apps and all browsers that can handle the link. But the Y

Join the discussion →

Display brand linked terms above product title in WooCommerce shop pages

I am trying to display the brand name above the product title on the shop page. The code works, but it removes the link from the product title so it no longer links to the single product page. I have no idea how this can be edited to work properly. add_action( 'woocommerce_before_shop_loop_item_title', 'show_brand_before_title', 10 ); function show_brand_before_title() { global $product; $terms = get_the_terms( $product->get_id(), 'product_brand' ); // Replace 'product_brand' with the slug of your brand taxonomy if ( $terms && ! is_wp_error( $terms ) ) { $brand_list = array(); foreach ( $terms

Join the discussion →

"/.well-known/appspecific/com.chrome.devtools.json"' request

I have an app with Remix and Prisma. On the server side console I get this error: status: 404, statusText: 'Not Found', internal: true, data: 'Error: No route matches URL "/.well- known/appspecific/com.chrome.devtools.json"', error: Error: No route matches URL "/.well-known/appspecific/com.chrome.devtools.json" Seems like something from chrome dev tools. How can I prevent this request? The stack: "@remix-run/node": "^2.15.3", "@remix-run/react": "^2.15.3", "@remix-run/serve": "^2.15.3", "isbot": "^4.1.0", "prisma": "^6.8.2", "react": "^18.2.0", "react-dom": "^18.2.0"

Join the discussion →

How do I use Claude Code with an existing Anthropic API Key?

Instead of going through claude console /login to create a new API key, I would like to use an existing Anthropic API key. How do I get Claude Code to do this? The /login command forces you to authenticate via Anthropic. Claude Code would like to connect to your Anthropic organization MyCompany YOUR ACCOUNT WILL BE USED TO: Generate API keys on your behalf Access your Anthropic profile information [Authorize] [Decline] Clicking authorize results in Account role 'user' does not meet requirements for scope 'org:create_api_key'. One of these roles is required: claude_code_user, developer, owner,

Join the discussion →

How to run k8s lightweight when developing controllers on slow PC

I am using an old laptop with Intel dual-core T2390 @1.86GHz and 3GB RAM to play with k8s like dev controllers and operators. I managed to run minikube but my PC gets very slow, especially when trying to share screen. I am trying to come up with a lighter way to run k8s like run only api and etcd but afraid I will lose options and add complexity to my development like kubeconfig. Is there any suggestion on how to run nodeless k8s development environment?

Join the discussion →

Why does yt-dlp work locally but fail with a bot error in production (live environment) even with cookies?

I'm trying to download YouTube videos using the yt-dlp Python library in a deployed web application. The same script works perfectly on my local machine, but in the production (live) environment, it throws bot-related errors such as HTTP 403 or CAPTCHA. It seems that YouTube is detecting the server as a bot. I’ve already tried: Using the --cookies option with valid cookies exported from my browser Exploring third-party APIs and GitHub repositories (in both Python and JavaScript) Despite these efforts, it consistently fails in production, while working flawlessly in local development. I expecte

Join the discussion →

Slow `conda initialize`

My Terminal windows are slow to start. I found that this chunk of my ~/.zshrc file is the culprit, taking up to 6 sec to execute: # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/Users/foo/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/Users/foo/miniconda3/etc/profile.d/conda.sh" ]; then . "/Users/foo/miniconda3/etc/profile.d/conda.sh" else export PATH="/Users/foo/miniconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<< Is this expected? How can I ma

Join the discussion →

Python telebot inline buttons do not response for some reason. Button handlers not responsing

Python 3.13.2, pyTelegramBotAPI-4.27.0, Windows 10 I have a problem with Python telebot inline buttons. It worked fine for a long time, without any problems. At some point it stopped to work. I did not change the code. I tested even basic examples and have the same behavior - handler is not triggered. Perhaps there is a way to debug this? import telebot from telebot import types API_TOKEN = '0123456789:AaBbCcDdEe' bot = telebot.TeleBot(API_TOKEN) kb = types.InlineKeyboardMarkup(row_width=1) btn_types = types.InlineKeyboardButton(text='label1', callback_data='btn_types') kb.add(btn_types) @bot.

Join the discussion →

Unable to switch to different environment using Flutter pub Injectable

I am currently facing an issue after upgrading my application to injectable version 2.5.0. There are two main environments the app uses - "prod" and "demo", each one with their own SQLLite database injectable modules. After updating, the app now always defaults to the production environment and uses the production database, even when demo mode is selected and getIt.init(environment: 'demo') is called. I stepped through the injectable pub's code, and it appears that it keeps defaulting the environmentFilter object value to "prod." So, after looking at the documentation on the injectable pub's w

Join the discussion →

Playwright install fails on Ubuntu 24.04 due to missing system dependencies, even after installing recommended packages

I'm trying to set up Playwright for Python on Ubuntu 24.04 (Noble Numbat). Here are the steps I followed: Created a virtual environment: python3 -m venv venv source venv/bin/activate Installed Playwright and other dependencies: pip install playwright rich python-dotenv Then tried to install the browsers: playwright install But I received this warning: ``` Playwright Host validation warning: Host system is missing dependencies to run browsers. Please install them with the following command: sudo playwright install-deps ``` However, since Playwright is installed inside a venv, I can't run sudo p

Join the discussion →

How to generate FeignClient interfaces and Lombok-annotated models using OpenAPI Generator?

I am using openapi-generator-maven-plugin to generate Feign clients and models from an OpenAPI spec. Example OpenAPI file: openapi: 3.0.1 info: title: ReviewApis version: 1.0.0 paths: /create-new-review: post: summary: Create a new review operationId: createNewReview ... components: schemas: Review: type: object required: [title, content, score, bookId] properties: id: type: string format: uuid Maven plugin config: <plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <version>7.3.0</version> <executions> <execution> <id>generate-review-service-fe

Join the discussion →

NVCC compilation error: exception specification is incompatible with that of previous function "cospi"

When I try to compile a simple CUDA program, e.g. the vectorAdd sample, I get errors about incompatible exception specifications: $ nvcc -I ../../../Common/ -ccbin g++-13 -Wno-deprecated-gpu-targets vectorAdd.cu /usr/include/x86_64-linux-gnu/bits/mathcalls.h(79): error: exception specification is incompatible with that of previous function "cospi" (declared at line 2601 of /usr/local/cuda/bin/../targets/x86_64-linux/include/crt/math_functions.h) extern double cospi (double __x) noexcept (true); extern double __cospi (double __x) noexcept (true); ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h

Join the discussion →

Error when trying to connect my VS Code to Live Share

I'm facing a recurring error when attempting to connect to Live Share in Visual Studio Code, which hinders my collaborative coding efforts. Despite several troubleshooting attempts, the issue remains unresolved. I’ve tried uninstalling the Live Share extension, restarting my system, and reinstalling it, but the error persists. I’ve also ensured that my VS Code is up to date, yet the problem continues to disrupt my workflow. I’m reaching out for assistance to diagnose and fix this issue. Could someone provide detailed steps to identify the root cause? For instance, how can I check Live Share lo

Join the discussion →

Error While trying to create idempiere in a kubernaes cluster

Long story short, our company had a idempiere (with a little custom) in a docker runtime environment it works totally fine. But, when we want to migrate it into our kubernates cluster, but we face some issues. First, Setting myEnvironment .... =================================== ││ Starting iDempiere Server ││ =================================== ││ OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 ││ An error has occurred. See the log file ││ /opt/idempiere/configuration/1745458786367.log. in the containers log, there is this error. Second, !SESSION

Join the discussion →

How can a singleton class have static methods that call instance methods?

I wish to create a class which extends EventTarget, allowing addEventListener() and dispatchEvent() to be invoked on it. Logically, my class wants to be a singleton; if a page accidentally instantiated more than one, its functionality would break. For this reason, I've implemented the entirety of this class's logic as static fields and methods. Unfortunately extends doesn’t seem to mesh neatly with static, so this doesn’t work: class MyClass extends EventTarget { static dispatch(type) { MyClass.dispatchEvent(new Event(type)); } } MyClass.dispatch('hello'); Uncaught TypeError: MyClass.dispatchE

Join the discussion →

How to migrate SIWA (Sign in with Apple) users for iOS app with Firebase backend when transferring the app to a different App Store Connect team

Our iOS app uses Sign in with Apple to authenticate users, and we use Firebase for the backend — for both Auth and Storage. If anyone can provide guidance and/or share experience on how to migrate an iOS app to a different App Store Connect team, particularly with a Firebase backend, that would be fantastic. Below I'll provide info about our situation, and I'll describe what I understand so far about the migration process. About our app: A few months ago, we transferred our iOS app to a different App Store Connect team, and it seemed that everything was fine... but recently we learned that we

Join the discussion →

Strange behaviour of Rcpp when generating random numbers

I have a routine written in Rcpp that is supposed to generate random numbers. Strangely enough, if I also call a completely unrelated routine, it always returns the same number. Here is a toy example: #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] void f() {} // [[Rcpp::export]] void test(Function g) { for(int j=0;j<5;++j) { Rcout<<R::runif(0,1)<<" "; } Rcout<<"\n"; for(int j=0;j<5;++j) { g(); Rcout<<R::runif(0,1)<<" "; } } test(f) When running test the first loop generates different random numbers but the second always generates the same. Both loops start with the same number. So

Join the discussion →

Iterating a list once instead of twice to get sum of each of two properties

I have JSON for students with marks. I need to get the total marks for each of maths and English. I could do it individually for each subject like below, but then the list is iterated twice. Is there a way to get both the marks by iterating the list once? Maths //for each standard , give the sum of Maths marks Map<Integer, Integer> mathsMarksPerStd = reportCard.getStudents().stream() .collect(Collectors.groupingBy(Student::getStandard, Collectors.reducing(0, st-> st.getMarks().getMaths(), Integer::sum))); English //for each standard , give the sum of Maths marks Map<Integer, Integer> engMarksP

Join the discussion →

Child process of cagefs_virtual_address_pipe transport returned 255 (could mean shell command ended by signal 127

I'm probably asking far too much, but I'm really stuck. I have an email piping script that works fine on PHP 7.4, but on PHP 8.2 I get the following error: Child process of cagefs_virtual_address_pipe transport returned 255 (could mean shell command ended by signal 127 (Unknown signal 127)) from command: /bin/cagefs_enter My web host says the problem has nothing to do with Cagefs and it's all related to the two piping scripts. Can anyone suggest what might be going wrong? I'd be very grateful! Two scripts: catch-all.php #!/bin/bash /usr/bin/php -q -f /home/mydomain/email-pipe/catch-all-inner.p

Join the discussion →

"Returned" Chinese Visa Application. Which Option to Choose?

Applied via VFS Dubai – Visa Returned Despite VIP & Express Service – Confused About Reapplying Process (Need Advice) I recently applied for a Chinese visa through VFS in Dubai. I opted for the VIP package and chose express processing to speed things up. Everything seemed in order — until an issue came up with the “Passport Country” field on my Canton Fair invitation. Apparently, due to a glitch in the Canton Fair invitation system — likely caused by the unusually long company address of my Dubai employer — the country field didn’t appear correctly. At the visa center, the agent asked if I had

Join the discussion →
Older stories