instruction
stringlengths
0
30k
I was trying to intercept and modify browser network requests response. To be exact I need to modify responses based on request url. From searching the Internet I came up with a code which is working fine in browser console also with tampermonkey extension. But when I tried to make it into an extension it is not wor...
How can I modify javascript native fetch function from an extension?
|javascript|google-chrome-extension|browser|tampermonkey|userscripts|
null
I'm facing issue while trying to run Apex code in vs code studio, i have installed the jdk 17 set the path check on cmd as well, everything seems fine still in vs code i'm getting this error "Running java command C:\Program Files\Java\jdk-17\bin\bin\java -XshowSettings:prop: Unable to activate the Apex Language Serv...
Error in running apex code in vs code studio
|java|visual-studio|version|apex|salesforce-lightning|
null
This probably is happening because your commandline command is too long. I assume IntelliJ suggested you to use @argfile to shorten the command. Then when you ran it you encountered this exception. I had the same problem on Windows. In my situation using JAR Manifest command shortener did not help. I solved it by mo...
What is the cost of Java's native methods?
|java|performance|java-native-interface|
I don't think the symbol has a specific name, it is definitely a Sigma, just barred. If you want to draw this in LaTeX, you can use the math versions of the `\Xlap` commands (where `X` is one of `l` `c` `r`) offered by the `mathtools` package, that allow printing a symbol without it taking any actual horizontal space....
I'm trying to run mutation testing with Stryker on my project which uses JEST to run unit testing. I didn't get any errors, but all the tests are getting the “timeout” status, however, my mutation score is 100%. Is this correct? Can I accept this as a good result? Or that something wrong happened? [enter image d...
All tests are being considered "timed out" but my mutation score is 100%
|javascript|node.js|unit-testing|jestjs|stryker|
null
I am not sure if this is possible to do or not but I am trying to figure out how to update markers on camera movement, device movement which i am using the centerLongitude and centerLongitude for or data change, is this possible with the current structure of my app? I have tried to add a listener for my locations docum...
Google Maps Flutter - Update Markers on data change or movement
|flutter|maps|
null
You can do this: class A { void f() { { const auto& self = *this; // self is const } } }; However, `this` is still in scope. You can also declare a custom functor that takes takes a `const` reference: struct fo...
I have an AWS Appflow to transfer files from a SharePoint to a S3 bucket, configured to run weekly and only make an incremental transfer of changed files. I did not found a way to make Appflow overwrite files with changes, instead to creates a subfolder each type named after the ID of each AppFlow weekly run. ...
|javascript|react-native|expo|shopify|flash-list|
We are facing below type of crashes. Fatal Exception: java.lang.RuntimeException: Using WebView from more than one process at once with the same data directory is not supported. https://crbug.com/558377 : Current process [Package Name] (pid 28046), lock owner unknown at org.chromium.android_webview.AwDataDi...
Crash : org.chromium.android_webview.AwDataDirLock.b
|webview|
null
Suppose I want to put an object on the "heap", but I need to have some additional memory allocated after it. My understanding is that the following would be a standard-compliant way of doing this: (Assume for the moment that nothing is overriding `new`, and the destructor of `SomeClass` doesn't throw) ```c++ #i...
The `end_of_string` is required. Example: In a case like inserting "1234" and "123456", the expected common prefix is: "1234": (root) <br> | <br> '1' <br> | <br> '2' <br> | <br> '3' <br> | <br> '4' (end_of_string) <br> | <br> '5' <br> | <br> '6' (end_of_string) <br> -- [Demo][1] The data struc...
|c#|razor|asp.net-core-mvc|
Can autocorrect functionality be implemented in React.js using any built-in library? Additionally, please suggest scalable methods of implementation that are not too heavy. If not using a React.js library, are there any alternative methods available?
Implementing Autocorrect Functionality in React.js Using Built-in Libraries
null
Update the dependencies in your project. this way, for npm, npm install @react-navigation/native@latest npm install react-native-gesture-handler@latest npm install react-native-reanimated@latest for yarn, yarn add @react-navigation/native@latest yarn add react-native-gesture-handler@la...
ruby @random_iv = OpenSSL::Random.random_bytes(@iv_random_length) @cipher.iv = @random_iv @logger.info(' random_iv '+Base64.strict_encode64(@random_iv) ) @logger.info(' data '+Base64.strict_encode64(data) ) result = @cipher.update(data)+@cipher.final if @mode == "encrypt" ...
I've been trying for two days adding a payment method to Google Cloud Console but continue getting the error below: This action couldn’t be completed. Try again later. [OR_BACR2_34] Does anybody know how to bypass the said error? I was trying to add a payment method to my cloud console account but it continue...
null
|google-cloud-platform|
My problem solved by adding > provideAnimations() to providers where I have > MatInputModule module present. import { provideAnimations } from '@angular/platform-browser/animations'; ... @NgModule({ imports: [ CommonModule, ReactiveFormsModule, MatInputModule], ...
null
I've just picked up Resharper and have been playing around converting fields to properties. I want these properties to be protected, but Resharper doesn't want to give me that option. Instead there is only a Protected Internal option. This has me thinking. Either there is a rule somewhere that properties should always ...
Does Spark Dynamic Allocation depend on external shuffle service to work well?
I need send a int to a C# server (POST) and then return Json. On server (C#) always comes zero. In JS browser console all right (not null/zero). It's an http 500 error: > Failed to load resource: the server responded with a status of 500 Code: ``` const CallNextTextFromChoice = (nextChoiceID) => { a...
Post (React, C# ASP.NET Core) always returning null
Check for an empty input before converting the input to float. This way you can distinguish it from other invalid inputs. ``` def prompt_for_angles(angle_name: str) -> float: while True: num = input(f"Angle for {angle_name}: ").strip() if num == "": return unknown try: ...
When you **call** a function like **get_regular_price()** in ``` reg_price = get_regular_price() ``` **get_regular_price()** becomes whatever value is returned. So if price is 5 and get_regular_price() returns 5, the original line becomes synonymous with ``` reg_price = 5 ``` As for ``` def discount(price): ...
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
{"Voters":[{"Id":7508700,"DisplayName":"David Buck"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":1007220,"DisplayName":"aynber"}],"SiteSpecificCloseReasonIds":[]}
Similar to @Vishal's OP, I ran into this issue with mapbox_maps_flutter plugin after upgrading AGP ~8.1. You may run into something similar if you are upgrading a package in your project that requires Gradle 8 (i.e. flutter_stripe). After ensuring my gradle JDK and JAVA_HOME were pointing to Java 17 the process to fix ...
It didn't show us what the library `services` is, maybe there's something wrong for the `card_packs`, or it's **empty**. I create a basic data to show how them inserted into the TreeData, then as the data of Tree element. ```python import PySimpleGUI as sg kinds = {"Spades":"♠", "Hearts":"♥", "Diamonds":"♦",...
To resolve the issue, I executed the command `sudo php artisan optimize:clear` to completely clear the optimization. This action prevented the problem from reoccurring.
Filling multiple blanks among texts in a cell using values from other cells
|excel|vba|reference|
null
{"OriginalQuestionIds":[70062221],"Voters":[{"Id":8690857,"DisplayName":"Drew Reese","BindingReason":{"GoldTagBadge":"react-hooks"}}]}
You can handle it the API itself like: private readonly UserManager<ApplicationUser> _userManager; public UserService(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public async Task<Status> Login(LoginViewModel logInViewModel, string baseUrl) ...
I created a new visionOS project in Xcode. I chose RealityKit as the immersive space renderer, windowed, and mixed. I create the project, and I'm getting a build error 'No such module 'RealityKitContent' The error says 'Missing package product 'RealityKitContent' I am using visionOS version 1.1, with Xcode 15.3, M1 M...
You escaped one of close parentheses and so open/closed parentheses are not matched
[my pages content][1] [1]: https://i.stack.imgur.com/Dn7wH.png I am working on my project and i want to make it responsive and i am having problem adjusting the position of each element.So far i have been trying to adjust them with media queries and with margins like the example below but i think they are interfe...
Trouble adjusting content with css
|css|
You cache the `node_modules` to `$(System.DefaultWorkingDirectory)/node_modules`, the path should be `_\agent_work\1\s\node_modules`. The self-hosted agent will run `execute git clean -ffdx && git reset --hard HEAD` before fetching, it will delete the folder `node_modules` and install the `node_modules` everytime. che...
How to configure weekly incremental AWS Appflows to overwrite former files
|amazon-web-services|amazon-s3|
null
The code does not delete the current node at `position`, instead the code emulates deletion of the current node by copying the next node's data and next pointer into the current node, then it deletes the next node. This is why the code is O(1). If there are any existing pointers to the next node, then those pointers be...
I am using Oracle APEX 23.1. I created an app, then enabled PWA after I created it. I have enabled persistent authentication on the instance and in the application. But now, deep linking isnt working. All deep links take me to the Home page (authenticated, so peristent authentication is working). So I can on...
Seaborn creates its scatterplot a bit different than matplotlib. That way, the scatterplot can be customized in more ways. For the legend, Seaborn employs custom `Line2D` elements. The following approach: - replaces Seaborn's `hue_norm=(0, 3)` with an equivalent matplotlib norm - creates dummy `Line2D` elements...
I have this query and I can't figure out how to sort it alphabetically. Can anyone help me? ``` =QUERY({'Cohort 24'!E4:O;'Cohort 25'!E4:O;'Cohort 26'!E4:O;'Cohort 27'!D4:N},"select * where Col1 is not null or Col2 is not null or Col3 is not null or Col4 is not null or Col5 is not null ") ``` The first column i...
Suppose you are writing a python web client to access an API of an online supermarket. Given below are the API details. Base URL= http://host1.open.uom.lk:8080 The following product has been entered into the API server by you in the previous question. However, it has been noted that the entered product's brand s...
null
The following code is ok for trashing the file instead of removing it (avoid permission denied): _ = service.files().update(fileId=fileDelete, body={'trashed': True}).execute() and if you are in a shared drive remember to use: _ = service.files().update(fileId=fileDelete, body={'trashed': True}, suppor...
I have this code where `Derived` is a subclass of `Base` and I need to override the `func` method assuming that `proc` method is common and have a lot of statements. Does concept and template programming allow such requirement? Hereunder is the code. ```cpp // templateInheritance.cpp #include <iostream> ...
Polymorphism using template and concepts
|c++20|c++-concepts|c++-templates|
You can do this: ```rs enum Hand { two_pair(String, String), three_of_a_kind(String), } fn print_hand(hand: Hand) { let value = match &hand { Hand::two_pair(a, b) => a.parse::<i32>().unwrap() + b.parse::<i32>().unwrap(), Hand::three_of_a_kind(a) => a.parse::<i32>().unwrap(), ...
I'm looking to add YouTube videos to my web app, but I want to prevent users from accessing the direct links to the videos while they're using my app. How can I achieve this? To be honest I don't have any idea on how to do this. So please help guys!
I want to embed YouTube videos in my web app while safeguarding the direct video links. How can I do this?
|javascript|node.js|hyperlink|youtube|embed|
null
Get all file from blob directory timeout 400 error when having large number of file
This could be done in several different ways. There is no set standard. You could do it with `url?arr=1234,1235`, but you need to make sure that your backend parses the query parameter accordingly with something like `arr = req.query.arr?.split(',')`. Keep in mind that URL query parameters are just strings and ...
{"Voters":[{"Id":9473764,"DisplayName":"Nick"},{"Id":874188,"DisplayName":"tripleee"},{"Id":466862,"DisplayName":"Mark Rotteveel"}]}
I created module `react-native-inactivity` for this purpose. By using this module you can actually get if the app is inactive for 1 minute. You can use in this way. ```js import ReactNativeInactivity from "react-native-inactivity"; export default function App() { const [showImage, setShowImage] = React.useSta...
I was facing a similar issue, hence posting my solution here for future audiences. If you look closely at your inference_func() # im = cv2.imread(image) im = torch.tensor(image) def inference_func(model, image): inputs= [{"image": image}] return model.inference(inputs, do_postp...
I would like to delete some of the posts on a wordpress website between a time period based on an author via the MYSQL database. I couldn't identify which tables I should join to delete these posts. The below query is just for your understanding(the actual query might involve some joins). Appreciate your help. ``` ...
|llama-index|llama-cpp-python|mistral-7b|
> Is there some regular expression of a single Chinese character, which could be any Chinese characters that exists? **Recommendation** To match patterns with Chinese characters and other Unicode code points with a Flex-compatible lexical analyzer, try the RE/flex<sup>[1]</sup> lexical analyzer generator, that I ...
I have a Rails 7.1 app and multiple (Rails Engine) Gems with conflicting inflection rules. There is `Gem1::Api::Gem1Controller` under `app/controllers/gem1/api/gem1_controller.rb` and `Gem2::API::Gem2Controller` under `app/controllers/gem2/api/gem2_controller.rb`. As I understand it, Zeitwerk uses global autoloaders...
Rails 7.1 resolve conflicting Zeitwerk Inflection rules
|ruby-on-rails|autoload|rails-engines|zeitwerk|inflector|
[![enter image description here][1]][1] @Mo711, your code (particularly the second sample) is just too long to check. Lagrangian mechanics is straightforward to apply – if you choose the right generalized coordinates. This is a 2-degree-of-freedom problem (so your first post on Stack Exchange must be wrong: it ...
I need a Signal-based utility to keep track of the status of multiple async operations performed with observables (e.g. HTTP calls). So I can use those signals also in Components using the `OnPush` change detection strategy. Suppose I have an `AnimalService` that you use to fetch animals: ```typescript @Injectab...
**Dimensions.get('screen').height - Dimensions.get('window').height - StatusBar.currentHeight** will give you the bottom navigation bar height. In older Android phones, sometimes the status bar height is included in Dimensions.get('window').height as well as mentioned by [@Ian][1] above. To tackle it, we need to ...
<!-- language-all: js --> *[Here's one approach][1]; do test out with varied scenarios to make sure its givin' out the intended output...* =choosecols(ifna(hstack(let(Ξ,G2, Δ,tocol(,1), Λ,iferror(chooserows(C2:C,sequence(index(match(,0/(C2:C<>0)))))),if(sum(Λ)>G1,Δ,reduce(Δ,,lambda(a,c,vstack(a, if(Λ...
I just fired up a new project to verify that this works: npm init npm install prisma --save-dev Add .env file with database information, e.g. DATABASE_URL="postgresql://postgres.xxxxyyyyzzzz:passpasspass@aws-0-us-west-1.pooler.supabase.com:5432/postgres?schema=public" where postgres.xxxxyyy...
null
from manim import * class SinXYPlot3D(ThreeDScene): def construct(self): axes = ThreeDAxes( x_range=[-2, 2, 0.5], y_range=[-2, 2, 0.5], z_range=[-1, 1, 0.5], x_length=7, y_length=7, z_length=4 ) def ...
|ruby-on-rails|