instruction
stringlengths
0
30k
I'm trying to perform some commands to remove useless output from a file, I've figured out the necessary commands to do this although when trying to automate it through python, find the command is cut off midway through because part of the text I am trying to remove, is a carriage return. ``` def do_stuff(): ...
I have a custom view and I want to make the ability for a user to zoom in and out with pinching (like an image), but it doesn't work. I added the functions from here https://developer.android.com/develop/ui/views/touch-and-input/gestures/scale#basic-scaling-example. But when I pinch it doesn't scale I tried to ad...
I don't know how to do what you're asking. But there are a number of things to make this easier on yourself. - You can use the command that opens a new window tab instead of a new window: `workbench.action.newWindowTab`. - You can keep opening new windows instead of new window tabs, and then bind to the command tha...
First you need to download the php version. Then you need to add the php version file you downloaded to system properties / advanced / environment variables / system variables / path for windows.
I want to use Spark DRA (Dynamic Resource Allocation) feature, so that the executors can be requested/released dynamically based on my application workload to improve resource utilization But I wonder whether I must enable the spark external shuffle service to use the DRA (that is, whether DRA depends on spark externa...
I want to make the effect of the scrollview moving along when the view pops up like this: [![enter image description here](https://i.stack.imgur.com/f68Kg.gif)](https://i.stack.imgur.com/f68Kg.gif) However, when I scroll the scrollview to the bottom, the following effect occurs: [![enter image description here](ht...
Is polar decomposition commutative?
|python|scipy|svd|
null
Here the pg_available_extensions word is selected: [enter image description here](https://i.stack.imgur.com/nWtnd.png) . The selection is not visible I tried to find a configuration parameter that would address this issue and could not find one. I lost hours trying to fix this as there are behavior associated to...
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`; Make sure you this in the deployment stage instead of pdfjs.GlobalWorkerOptions.workerSrc = new URL("pdfjs-dist/build/pdf.worker.min.js", import.meta.url).toString();
I'm making an Aqua button (from Mac OS X) and one of the many things I have to fix is pulse. However I found a quarter-working fix but doesn't fix the other problem of make the entire background pulse instead of the background size. So what I what is the entire background of the button to pulse instead of `backgr...
Your font needs to map the ZWJ and ZWNJ characters to glyph IDs in the cmap table. Then, you reference those glyph IDs in GSUB lookups as needed. To see an example, you can download and install the Microsoft VOLT tool: https://learn.microsoft.com/en-us/typography/tools/volt/. In the install folder, there will be a "...
There are multiple ways to achieve this, one way is to have two `Subjects`, one for holding a list of tokens, the other for doing the search. [Working Example][1] ### Brief Overview of the Filter **Not a query** This is what happens when `this.tokens` is updated either by initialization or adding/removing ...
Try this code. This will move the Excel file to the Right Monitor. I have tried it and it works. I have commented the code so you should not have a problem understanding it. **Important Note**: Since we are using VBA code, your files need to be saved as `.xlsm` and not `.xlsx` **In the ThisWorkbook Code module.**...
Route::group(***['middleware' => 'verified', 'web']***,function(){ Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard'); });..... I don't think that's a correct way to define multiple middleware you should pass them as an array like this:['middleware' => ['verified', 'web']] Try this...
You have to use input tag with type="submit" name="id" value="1" Buttons does not have name and value attributes.
``` CREATE OR ALTER PROCEDURE [dbo].[identify] AS BEGIN SET NOCOUNT, XACT_ABORT ON; DECLARE @UpdatedRows TABLE ( action NVARCHAR(10), first_name NVARCHAR(50), old_last_name NVARCHAR(50), new_last_name NVARCHAR(50) ); MERGE INTO [dbo].[warehouse] AS dim...
here above the red component should occupy the entire screen and the button should go to the bottom ``` `<SafeAreaView style={{flex: 1, backgroundColor: 'red'}}> //red component <TouchableOpacity //purple component style={{ // flex: -1, width: '100%', bottom: 0, ...
{"Voters":[{"Id":16695029,"DisplayName":"user16695029"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":16791505,"DisplayName":"Paolo"}]}
Route::group(***['middleware' => 'verified', 'web']***,function(){ Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard'); });..... I don't think that's a correct way to define multiple middleware you should pass them as an array like this:['middleware' => ['verified', 'web']] Try this...
The first thing to discuse is you have the text `target\SEGMENT.sql`. To get into a SQL database via the SQL parser (the thing that reads `SELECT 1;`) you need to escape it correctly: ``` SELECT 'target\SEGMENT.sql' as text_wrong, 'target\\SEGMENT.sql' as text_correct; ``` gives: [![enter image descrip...
I work with Firestore in my flutter application. I programmed that you can create notes and edit them. If i call my update function in the creation of the note the app doesen't crash. If I call it afterwards the app crashes. I printed the error to the console and this was what i got: > Assertion failed: file:///C:/...
UIScrollView.setContentOffset() cannot set to the specified position in certain cases
|swift|swiftui|uikit|
null
{"OriginalQuestionIds":[69254117],"Voters":[{"Id":12545041,"DisplayName":"SamR"},{"Id":6461462,"DisplayName":"M--","BindingReason":{"GoldTagBadge":"r"}}]}
|amazon-web-services|amazon-ec2|bastion-host|bastion|
null
Sphinx warning: Failed to import test.test_adder from module `pythontemplate`
|python|python-sphinx|restructuredtext|documentation-generation|autodoc|
|macos|visual-studio-code|
I have a commit with a tag, but when I amend any changes to it, it loses the tag. I am not new to git, but still can't understand how it works I've tried: ``` git commit --amend --no-edit git commit --amend --no-post-rewrite git commit --reuse-message=HEAD -C HEAD ```
How to amend last commit without losing commit tag
I am running into the same issue. Upon further digging I found this explanation: > This API is an enterprise-only API used to create and manage the Keep notes within your domain, ... Which was found in the Google Keep API [documentation][1]. (Thanks to amanda-tarafa on 2021-09-03 found <strike>[here]</strike>...
|macos|visual-studio-code|
As already recommended in the comments you can improve the sieve using [wheel factorization](https://en.wikipedia.org/wiki/Wheel_factorization#:~:text=Wheel%20factorization%20is%20a%20method,with%20n%3D2x3x5%3D30.). This is an example that I created some time ago using a wheel of size 30 for the range of use you ask...
Without more information, it's hardly possible to give a definite answer. There's no a one-size-fits-all answer. On one extreme of the spectrum, you can model any database row as a dictionary. The column name is the key, and the dictionary value for that key is the row's column value. At the other extreme, you could...
screenshot is showing what is[![enter image description here][1]][1] running inside my Until activity in azure ADF. the lookup- Get parentNotebook is trying to check and see if there any parent notebooknames whose child have succeeded and retreive the name of it. the exit condition for loop is that check for any notebo...
ERROR 1064 (42000) in main.mysql: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 1 I have this code : CREATE PROCEDURE solution() SELECT name FROM leaderboard ORDER BY score DESC LIMIT 5 OFFSET 3; END The c...
SQL Syntax on stored procedures
|sql|
null
I guess this is getting close votes because it will be the data that is causing the problem, but the data is not given. But maybe your data cannot be given, or there is too much of it. So I'd suggest try just using the first/half second half of data, and if only one or the other trigger it then keep repeating, to se...
I'm new to Rust and I find some behavior in Rust is not intuitive say we have the code below: ```rust struct User { name: String, email:String } fn main() { let some_vec = vec![String::from("value1"),String::from("value2")]; let _v = some_vec[0]; let user = User { ...
Running rails assets:clobber seemed to fix the issue.
``` printf '%s%1s%2s%2s%8s%6s\n' $REC_TYP $SYS_ID $SYS_FILE_NBR $DT_STAMP $TI_STAMP1 # ^^^ ``` Your 5th parameter is left-padded to a width of 8 chars, but the value (`162659`) is only 6 characters wide. Padding by default happens with a space character. Either set the correct width or don't set ...
You can only **EMBED** Youtube videos in an *iframe* and it'll only work if they're not very popular (ie: most music videos with tons of views get blocked). Here's how I do it, however... it is based on **data:text/html** to create a "openable" page on the fly and I'm not sure if this still works in the latest brows...
> how to create a Docker image and how to install a whl file into it. You install, build, do everything inside the docker image. You only copy the source code, on a fresh, unmodified repository without any new files. The idea is so that it is _self-contained_, _reproducible_ and research other buzzwords. ``` FRO...
It happens because of size mismatch. Use `nn.Flatten()` before Linear layer, or if you are implementing model using class api, use this line before first Linear layer: `x = x.view(-1, a*b*c)`. <br/>Note: [a,b,c] size of `conv3` output tensor
You can only **EMBED** Youtube videos in an *iframe* and it'll only work if they're not very popular (ie: most music videos with tons of views get blocked). Here's how I do it, however... it is based on **data:text/html** to create a "openable" page on the fly and I'm not sure if this still works in the latest brows...
I solved something similar a while ago, this CSS entry helped me: .tox .tox-edit-area::before { border: 0 !important; }
Grid: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Realizing_common_layouts_using_grids nth-child: https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css --> body, * { margin: 0...
I am trying to connect a Django Google App engine to an instance of Cloud Mysql using django-environ. The app is unable to connect to the database, but otherwise runs successfully. I have followed the Django tutorials for connecting to a cloudsql instance, and referenced the django-environ documentation regardi...
{"OriginalQuestionIds":[338768],"Voters":[{"Id":14991864,"DisplayName":"Abdul Aziz Barkat","BindingReason":{"GoldTagBadge":"django"}}]}
I already disabled service listing Axis2 services that are deployed in the WSO2 API Manager by adding the following configuration to the deployment.toml of the WSO2 APIM Pack: [n_http] 'http.block_service_list'=true but I also want to block access and disable showing all deployed services too like Versio...
How to disable showing default Axis2 services (https://localhost:8243/services/Version?wsdl) in WSO2 API manager 3.2.0?
null
var1 = int(input("enter a number:")) num = str(var1)[::-1] if var1 == num: print("its a palindrome") else: print("its not a palindrome") enter a number:121 ---> expexted its a palindrom its not a palindorme enter a number:123 its not a palindorme
check if the code checks if a given number is palindrome or not
|python|windows|visual-studio-code|slice|palindrome|
null
I have come from the FUTURE to answer this question. Actually, its 2024 and haven't been on stackoverflow in a LONG time. OK, call me crazy but.. but I dont want to run this everytime as Administrator. Simple solution -- Hold down the **Ctrl+Shift** keys when launching Visual Studio. That will give you the User ...
For example how do I apply `RBFInterpolator` on image loaded by opencv? I need to apply interpolation using vector-operations of numpy (which is fast) I need to do non-affine transformation on image by defining interpolation between image points. How do I do it?
How can I apply scipy.interpolate.RBFInterpolator on an image / ndarray?
I'm using livewire v2. I have a problem when calling a method in livewire feels slow because another method has a large data process, for example I have 2 methods. the first method is called `methodSmallData()` and the second method is `methodLargeData()`. The code example is as below: This is controller livewi...
I think what you're trying to do is this: n = int(input("N: ")) nums = [] for _ in range(n): v = int(input("Enter an integer: ")) nums.append(v) nums.sort() m = nums[-1] s = sum(nums[:-1]) if m == s: print("Yes", m) else:...
I'm trying to reproduce the results of the liquid s4 paper, but I ran into this problem of not being able to import Pyarrow. The entire error message read:`import pyarrow as pa` ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/nfs/state_space_model/.local/lib/python3.10/s...
Pyarrow: ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found
|linux|machine-learning|gpu|pyarrow|state-space|
null
While implementing PayPal webhooks in a Node.js application, I encountered an `401 Unauthorized` error with the message "Webhook signature verification failed". This issue arises when I make a `POST` request to `http://localhost:3001/paypal/subscriptions/webhook` using `Postman`. Background: To simulate webhook eve...
How to fix 'Webhook signature verification failed' in PayPal Node.js webhook?
|node.js|paypal-rest-sdk|paypal-subscriptions|paypal-webhooks|
null
I want to iterate through a word and print each of its characters, together with its ASCII number. I've tried ``` #include <iostream> #include <stdio.h> using std::cout; int main() { char cWord[30] = {"Larissa"}; int iCounter = 0; char cLetter = cWord[iCounter]; for (iCounter = 0; i...
Variable doesn't get updated when I run a loop
|c|for-loop|dynamic-memory-allocation|
null
According to https://doc.rust-lang.org/reference/lifetime-elision.html#default-trait-object-lifetimes, in certain cases, if a trait object has no lifetime bounds, its lifetime becomes `'static`, which is probably what happens here. To prevent this, the lifetime should be explicitly declared: ([playground](https://play....
I have the simplest nasm program in the world: global main section .text main: nop I compile it like this: nasm -f coff -o program.o program.asm Then, when I try to link it with `LINK.EXE`, it results in the following error: link program.o Microsoft (R) Incremental Linke...
I would probably do something like this: - Split the input on whitespace characters (we'll use `' '` as an example) - Recombine it with just one space as intended. ```csharp // This creates an array where each element is a "word" from // the original string that was separated by white space var split = myStri...
{"Voters":[{"Id":2402272,"DisplayName":"John Bollinger"},{"Id":1362568,"DisplayName":"Mike Kinghan"},{"Id":3440745,"DisplayName":"Tsyvarev"}],"SiteSpecificCloseReasonIds":[11]}
You can only **EMBED** Youtube videos in an *iframe* and it'll only work if they're not very popular (ie: most music videos with tons of views get blocked). Here's how I do it, however... it is based on **data:text/html** to create a "openable" page on the fly and I'm not sure if this still works in the latest brows...
|github|github-actions|pre-commit|pre-commit.com|
How can I split string with multiple delimiters and then swap words based on few conditions - From string - (delimiter is _ and string can vary with any kind of words, not just string starting with ocs) 'customer_document_map_ocsumm2','customer_ocsumm1','session_detail_ocsumm2' To string - 'ocsumm...
I am looking at this svg icon: https://www.iconfinder.com/icons/352263/cancel_icon How do I give the x inside of the circle a color other than transparent? [Screenshot][1] <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-html --> <svg viewBox="0 0 48 48" xmlns="h...
null
Hoping you're having a good day. So, i have this weird bug that's been kicking my ass and i'm not sure where it is located for the love of God. I have a ViewComponent that is rendered normally inside a view, i.e `*.html.erb`. For example, <%= render Contact::Avatar.new( contact:, size: ...
Errors are being swallowed inside ViewComponent, Ruby on Rails
|ruby-on-rails|ruby|view-components|
I am trying to read a csv file and read the field names (top row of csv file) from it. I used csv.Dictreader to create a reader object and extracted the top row using the reader.fieldnames object. I know that reader.fieldnames will be a list of strings for the kind of csv files I will be using. However, pylance conside...
{"Voters":[{"Id":125981,"DisplayName":"Mark Schultheiss"}],"DeleteType":1}
I have a class FRED which takes as input to its constructor the reference to two instances of class BARNEY: class FRED{ private: BARNEY &barney_inst1; BARNEY &barney_inst2; public: FRED(BARNEY &a, BARNEY &b): barney_inst1(a)...
Initializing member class with referenced inputs within parent class constructor
These are not Razor elements. They are defined in the [Super-Simple-View-Engine][1] itself. See the @Current definition in [SuperSimpleViewEngine.cs][2] and its usage in the [SuperSimpleViewEngine demo][3]. [1]: https://github.com/NancyFx/Nancy/wiki/The-Super-Simple-View-Engine [2]: https://github.com/NancyFx...
I'm trying to implement a slider with a tooltip showing current value. The idea is to make something like a HTML + JS **<input class=range>** with a value bubble (https://css-tricks.com/value-bubbles-for-range-inputs/). Both ideas I've come with so far are not ideal. XAML ``` <Slider x:Name="slider1" ...
Any update on disabling the 2 finger swipe on `TabView` in SwiftUI when using page style? I have been facing the same issue and not able to disable it for TabView in SwiftUI. But I changed my implementation using ScrollView to implement the TabView effect in one of my App. [![TabView using ScrollView][1]][1] ...
I'm trying to perform some commands to remove useless output from a file, I've figured out the necessary commands to do this although when trying to automate it through python, find the command is cut off midway through because part of the text I am trying to remove, is a carriage return. ``` def do_stuff(): ...
The solution is as simple as -- zip it! Since uploading `.zip` files directly to GitHub tickets and GitHub Wiki pages is allowed then there's seems to be no better or faster way than attaching necessary files (of any format) inside `.zip` archive. This solves both ticket-issue and wiki-issue mentioned by OP (me)....