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
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
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
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"
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,
I am new to langGraph and I have simple agentic app built using langGraph and FastAPI. Whenever the FastAPI application is running in docker with more than 1 workers, CMD: ["uvicorn", "app.app:app", "--host", "0.0.0.0", "--port", "8443", "--workers", "4", "--ssl-keyfile", "/etc/ssl/private.key", "--ssl-certfile", "/etc/ssl/certificate.crt"] the resume after interrupt is not working. The flow is not continuing from where it has interrupted. I get a 500 server error with below error message { "detail": "500: 'query'" } However when the same app is running with single worker and working fine. Bel
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?
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
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
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.
First, it is the most compact sine approximation ever. It seems I can do better than Remez in terms of precision/performance. Here the [0,pi/2] approximation range. double p[] = -0.0020836519336891552, -0.016434778826652056, -0.14814815034514656; double P1(double x, double a) { return x + (a * x) * (x * x); } //err Inf: 7.415237313068701e-9 double sine_approximate(double x) { return P1(P1(P1(x,p[0]),p[1]),p[2]); } And the same practical solution for float32 looks like: //maxErrULP=2.49524, maxErrInf=9.88345e-08 float p[] = -0.0020836557, -0.016434766, -0.14814815; Practical double64, // Error
I’m using Firebase Dynamic Links but encountering an issue where it doesn’t redirect to the App Store when the app is not installed. I’ve correctly set up the AASA file on the custom domain app.okuru.app, and the paths in the file are as follows: "paths": [ "NOT /__/auth/action/", "NOT /__/auth/handler/", "NOT /_/*", "/*" ] The Team ID in the AASA file is also correct. However, after customizing the dynamic link generation like this: Before: iosParameters: const IOSParameters( bundleId: 'com.okuru.app', ) After: iosParameters: const IOSParameters( bundleId: 'com.okuru.app', appStoreId: 'XXXX',
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
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
Body: I'm trying to dynamically generate a compact regular expression in Ruby based on a list of integers. For example, given this input list: [1,2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,19,20,21,22,23,25,26,27,28,29,30,31] I would like to produce a regex like: /^([1-7]|9|1[0-5]|1[7-9]|2[0-3]|2[5-9]|3[0-1])$/ This regex should match exactly the numbers in the list, in the most compact form possible — for example: 1-7 gets compacted into [1-7] 10-15 into 1[0-5] 17-19 into 1[7-9] and so on. What I have tried: I wrote the following Ruby code: def number_list_to_ranges(numbers) numbers.sort! ranges =
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
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
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
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
I implemented a functionality to capture a webpage screenshot and convert it into an image. Initially, I tried using Puppeteer, but it didn't work on Azure. Then, I attempted to use Playwright to achieve the same functionality, but I am encountering issues when running it from an Azure Function. Microsoft.Playwright.PlaywrightException: Driver not found: /home/.playwright/node/linux-x64/node at Microsoft.Playwright.Helpers.Driver.GetExecutablePath() in /_/src/Playwright/Helpers/Driver.cs:line 96 at Microsoft.Playwright.Transport.StdIOTransport.GetProcess(String driverArgs) in /_/src/Playwright
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
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
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
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
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
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
My model contains GIS map, routes, multiple process flow, etc. There are 110 facilities and 20360 demand points. It captures travel time, queue times, service times, utilization, etc. Model runs fine in regular simulation environment. I designed an experiment for 30 replications. In each replication, it stores each facility and demand's info, thus makes the output file quite big. The experiment runs fine for 1 or 2 replication, But even when put 5 replications at a time, it hanged or crashed. Sometimes it says out of memory. I thought huge output file for multiple replication creates problem.
I am attempting to retrieve SEC filings from sec.gov using their API with Python 3, and getting this error no matter what I do: Error: Request Rate Threshold Exceeded - Your Request Originates from an Undeclared Automated Tool Following the example provided here, including headers: https://www.sec.gov/about/webmaster-frequently-asked-questions#code-support def get01(): myHeaders = { "User-Agent": "Example_Company [email protected]", "Accept-Encoding": "gzip, deflate", "Host": "www.sec.gov" } url = "https://www.sec.gov/Archives/edgar/data/2062466/000206246625000004/wk-form4_1743625808.xml" resp
I am attempting to retrieve SEC filings from sec.gov using their API with Python 3, and getting this error no matter what I do: Error: Request Rate Threshold Exceeded - Your Request Originates from an Undeclared Automated Tool Following the example provided here, including headers: https://www.sec.gov/about/webmaster-frequently-asked-questions#code-support def get01(): myHeaders = { "User-Agent": "Example_Company [email protected]", "Accept-Encoding": "gzip, deflate", "Host": "www.sec.gov" } url = "https://www.sec.gov/Archives/edgar/data/2062466/000206246625000004/wk-form4_1743625808.xml" resp