instruction
stringlengths
0
30k
You could try to replace background-color with background, and there is a typo in "olor".
I'm working on process holllowing and each time I build someone program in visual studio. I pass through the same error: ``` System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex' ``` ``` using System; using sta...
I am trying to use a function to clean address data and want to replace the word "Street" with "St" but only in the cases where "Street" is the last word in the string. See the image[enter image description here](https://i.stack.imgur.com/Wfj8N.png) I tried using a WHERE clause like this: [enter image description h...
How can I replace a word in SQL but only if it is the last word in the string for a scalar-valued function?
|sql|database|function|replace|find|
null
in this website : https://www.tankathon.com/mock_draft I want to retrieve the tag href="**/players/zaccharie-risacher**"> From this ``` <div class="mock-row-player"> <a class="primary-hover" href="/players/zaccharie-risacher"> <div class="mock-row-name">Zaccharie Risacher</div> <div class="...
Parse tag in html via Google Sheets (importxml)
|html|parsing|google-sheets|
I try to setup the android app Winlator (https://github.com/brunodev85/winlator) on Android Studio, but I always get the error "A problem occurred evaluating root project 'app'. Plugin with id 'com.android.application' not found." from the build.grade (app) file. How I can I fix it? ``` apply plugin: 'com.androi...
You could `paste` strings out of the diseases, e.g. `'121'` for patient 2. Then `grepl` in a temporary `.k` column for patterns `12|132` and `subset`. Use `ave` to do group by `ID`. > df |> + transform(.k=ave(Disease, ID, FUN=\(x) grepl('12|132', paste(x, collapse='')))) |> + subset(.k == 1, sele...
I have a file `__init__.py` with the following import: ``` from ._nms import lib as _lib, ffi as _ffi ``` where `_nms.so` is a shared object in the same directory as this Python file. Relevant file structure is as follows (also see [this][1] repo, which this project is a clone of): ``` ├───nms │ │ │ ...
Why can't Python find this shared object I'm trying to relative import despite it existing in the same folder?
|python|import|cpython|
We have been using the `BGTask` (specifically a `BGProcessingTask`) reliably for the last couple of years for our app. Up until now they wake up automatically while the screen is off, the iPad is plugged in, and the app is running (that is, in the background), but never while the screen is on (that is, never when the `...
See example. Recursive assembling expression formula from expression_tree table. ``` with -- recursive -- for PostgreSql cte as( select expression_id,oid ,concat( case when lv in('*','+','-') then concat('{',lid,'}') else cast(lv as varchar) end ,ov ,case when rv in('*','+','-') ...
{"Voters":[{"Id":285587,"DisplayName":"Your Common Sense"},{"Id":5320906,"DisplayName":"snakecharmerb"},{"Id":20860,"DisplayName":"Bill Karwin"}]}
First, realize that your toy problem is combinatorially quite vast. A *very* crude lower bound on the number of options is: c(28, 14) * c(14, 7) * c(7,6) * 1 Which exceeds 1e+11. The true number is likely several additional orders of magnitude. One strategy to reduce the model size a bit is just to emp...
Continuation from [this post](https://stackoverflow.com/questions/70576618/r-plotly-bar-chart-positive-negative-values-different-color-second-axis/70590015#70590015?newreg=0df8984d32fc433fa9043be9ee1c41d2) I am trying to make a plotly bar chart on the second y-axis with negative values depicted as red and positive valu...
Chart with secondary y-axis with values positive and negative where the variable in the secondary y-axis changes
# Create separate data generators for training and validation train_data = data_generator.flow_from_directory( train_path, target_size=(img_size,img_size), batch_size=batch_size_train, class_mode='categorical', classes=['AKIEC et BCC','VASC et DF','MEL & NV & BKL'] ) Found 0 images belongi...
combination of 2 classes
|machine-learning|deep-learning|artificial-intelligence|
null
This is the first time I am running a Latent Class Analysis and using tidySEM. I have attached my descriptives table below for the 8 indicators I want to enter into the model. Seven of the variables are Likert scale responses either 1-4, 1-5 or 1-7. One variable is a binary no/yes response coded as 0/1 respectively....
I am looking for the method which is called when I click on button `add a line` in **odoo treeView** .Can you please help me .
odoo : look for method I click on button "add line" in tree view
|odoo|treeview|
I'm quite new with SQL. I have a query to construct and fill a table that looks like this: ``` SELECT A.ID AS Identification, B.Name AS Family_name, B.Firstname AS first_name, B.Address AS adress_1 FROM A LEFT JOIN B ON B.ID = A.ID UNION SELECT C.ID AS Identification, ...
Your instructor used `mongoose@5.2.17`, which was at a point before Mongoose started publishing its own TypeScript type definitions in its own package, so you should `npm i -D '@types/mongoose@~5.2.0'`. The `~` means anything matching `5.2` (any patch version under `5.2`). The reason why you should do that is because D...
I am trying to figure out how to bundle a third party software .exe with my wpf app .msi. I created a wix installer project and have that building my .msi file correctly and now I want to bundle that with a third party exe. The only problem is that it requires a detect condition. I found the install product identifier ...
Steppers overlap with the disclosure indicator if you try to add them to a UICollectionViewListCell using: cell.accessories = [.disclosureIndicator(), .customView(configuration: .init(customView: UIStepper(), placement: .trailing()))]. What's the correct way to add a stepper to the accessories of a cell then? Exa...
UIStepper disclosure indicator
|uikit|
null
|c++|image-processing|graphics|raytracing|
I have an SVG that I want to be responsive. I haven't set a `width` and `height` attribute because I ideally want it to be automatic. However, Safari doesn't render the SVG correctly without them. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-html --> <svg xmlns="htt...
|html|svg|safari|responsive-design|
I'm utilizing the TinyMCE editor in my application. It functions correctly in my local environment, storing data as expected. However, in the live environment on cPanel, the editor data is not being saved. Even upon form submission, the data is not retained. public function store(Request $request) { ...
Troubleshooting TinyMCE data retention issue
Fixed: cell.accessories = [.disclosureIndicator(), .customView(configuration: .init(customView: UIStepper(), placement: .trailing(), reservedLayoutWidth: .actual))]
I have a [pscustomobject] with the property 'id'. According to PowerShell documentation, the parameter '-id' can be passed through the pipeline using ByPropertyName. I discovered that the approach with ForEach-Object works (although I don't understand why), while the approach without ForEach-Object does not. ...
how to pass -id paramater to get-process from pipeline?
|powershell|
Gradle Build Failure: Inconsistent JVM Target Compatibility for Kotlin and Java Closed
I have the following in my PowerShell script: ```powershell foreach ($row in $csv) { # split the key into Key Vault name and secret name $keyParts = $row.key -split '\|' $functionAppName = $keyParts[0] $settingName = $keyParts[1] $value = $row.value if ($value -match '^https://.*...
null
Is there a way to execute for example w36: stuff = 'blabla' and w37: print(stuff) directly in vim while i also have lots of other code? I want to test out stuff while i'm programming but i couldn't figure out to test multiple or solo lines in VIM. Thanks for the help.
Executing just multiple python lines in VIM
|vim|
I had a slightly different take on this =IF(B1="","skipped",IF(B1=INDEX(A:A,COUNT(B$1:B1)),"match","difference")) but I realise this will break after the blanks in column A and something more would be required like an mmult. [![enter image description here][1]][1] ___ This was my thinking if the patt...
Reading [Mongo: Definite guide][1]: In first chapter, author mentions the following snippet to change some of the default commands of `db`: ```js var no = function() { print("Not on my watch."); }; // Prevent dropping databases db.dropDatabase = DB.prototype.dropDatabase = no; // Prevent dropping col...
Mongo Preventing access to dangerous command
|javascript|mongodb|mongosh|
I am making a ribbon like menu. For achieving, I created three basic components. - Component Item Class - Menu Template (XAML) - Menu Template (Code Behind) The class define each item ```c# public class MenuComponentItems { public string ImageSource { get; set; } public string CommandP...
null
Your `apiUrl` response must have the HTTP response header `Content-Length`. If it doesn't, there is nothing to compute. Also: the event handler should be bound to `xhr`: ```javascript xhr.addEventListener("progress", function(e) { ```
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...
Android Studio pinch scaling - ScaleGestureDetector - doesn't work in a custom View
|android|android-view|
null
You can use a context to propagate data through your client components ``` import { createContext } from "react"; export const SettingsContext = createContext<SettingsType>(DEFAULT_VALUE); ``` then declare the provider in your layout ``` /* SettingService.index should return Promise<SettingsType> ...
Swift BGTask running while iPad is awake--how is this possible?
|swift|networking|background-task|bgtaskscheduler|bgprocessingtask|
I just started messing with SignalR and VS2022 is giving me "Visual Studio is busy." I agree with general quality issues with Visual Studio these days. Maybe they should do a technology freeze for couple years and just focus on getting things work like supposed to.
I found a 3-year-old tutorial on youtube and it contains the following code snippet: ``` import { createStore, applyMiddleware } from 'redux'; import { composeWithDevTools } from '@redux-devtools/extension'; import thunk from 'redux-thunk'; import rootReducer from './reducers'; const initialState = {}; con...
Consider the following model (.NET 8, C# 12): public partial interface IEntity { public long Id { get; set; } } public partial interface IEntity<TEntity> where TEntity : class, IEntity, IEntity<TEntity>, new() { } public partial class User: IEntity, IEntity<User> { public long Id { get; s...
Rust Error the trait `Body` is not implemented for `Vec<u8>` hyper::client::conn::http1::handshake(io).await?;
|rust-tokio|hyper|
null
I'm trying to understand and take advantage of the ARMv8 ABI when choosing between pass-by-value versus pass-by-const&. In particular I have a struct that's a "Homogeneous Floating-point Aggregate (HFA)" in ARM lingo. I'll paste in some results from godbolt using armv8-a clang 18.1.0 with -O compiler switch. (I see sim...
Copy constructors and const& versus the ARM ABI
|c++|pass-by-reference|arm64|pass-by-value|abi|
First, a reminder to future self (the figure [RFC 3986, Section 3. Syntax Components][1] complemented with [Section 3.2. Authority][2]): ``` The following are two example URIs and their component parts: userinfo host port | | | ...
Wix bundle of third party exe and new msi cant figure out detect conditions
|wix|windows-installer|bundle|exe|bootstrapper|
null
Perhaps it was already somewhere in the themes. But I couldn't find a similar question. And the question is why Angular can't find modules and services. I create through "ng g", it seems that everything should be tightened. But it gives you an error or a warning. The service itself has several methods (functions): ...
`vector_of_ts.emplace_back(std::move(*t))` will let you move the T from the unique_ptr into the vector: [example](https://godbolt.org/z/1qdzznz7h) ``` #include <memory> #include <vector> struct T { // Can't be copied T() = default; T(const T&) = delete; T(T&&) = default; T &operator=(c...
Is there any way to run Excel VBA using a batch service in Azure? My company has many large Excel VBA engineering calculations that are run on a regular basis. I am looking at ways to run these efficiently, on demand. My current thought is I could use the Azure Batch service for this. When I create the batch...
Azure Batch for Excel VBA
az functionapp config is truncating trailing bracket
|powershell|azure-cli|
I am making a URL shortener. Here is my code for it. I want limit some URLs open only for login users. Why this is not working ``` app.get('/:shortUrl', async (req, res) => { try { const { shortUrl } = req.params; const urlData = await URL.findOne({ shortUrl }); if (urlData) { const cu...
Check user login in backend
|javascript|node.js|express|session|
Instead of retrieving the context from within the RESTDataSource, I deleted the willSendRequest overridden function and instead passed in the token: async getAccount(token) { return await this.get('account', undefined, { headers: { 'Authorization': token ...
Filtering class properties by a specific criteria
|c#|.net|reflection|
I'm trying to get animations working within their respective divs so that the user scrolling into a div is what triggers it. At the same time, I need to keep a single page type of feel where each div doesn't have it's own visibly scrollable area. The problem with this is that I can't seem to detect scroll events per ea...
Can't detect scroll event listener on separate sections
|javascript|html|
In JavaScript, it is said that functions are executed using the scope that was in effect when the function was defined. It has nothing to do with the scope in effect when the function is called. What exactly does it mean?
JavaScript function execution scope
|javascript|reactjs|react-native|expo-router|
You should use this: systemctl restart slurmctld
Does this happen for a specific request URL? Does the URL contain a colon (character `:` ) ? If yes, then it looks like it's a bug in GlassFish. The server checks whether the caller has access to the URL resource, and passes the URL to the authorization service. As stated in [WebResourcePermission​ docs](https://ja...
I have a struct that I'm playing around with to make a `doc` field serializable alongside the associated variable: ```rust #[derive(Debug, Serialize)] struct Field<T> { val: T, #[serde(skip_serializing_if = "Option::is_none")] doc: Option<String>, } ``` I'm trying to make it so that you can do ...
Plugin with id 'com.android.application' not found in Github Winlator Project
|android|github|installation|build.gradle|project|