instruction
stringlengths
0
30k
Replace/Exclude option when doing global Find/Replace in Intellij/Pycharm
|intellij-idea|pycharm|
I guess you can do something like this. I use the standard `(,)` instead of your `(:>)`, but only to keep the code minimal; there's nothing fundamental that can't be ported to your type. ``` {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ViewPatterns #-} import Control.Applicative im...
I'm trying to write a SQL query that reads our Jobs table and produces a schedule for each day of a given week. I want the results to show all 5 starting slots, regardless if there are jobs actually assigned to those slots. Example: Week of 03-24 thru 03-30 Mon - 03/25 - 01 - Job# 123456 Mon - 03/25 - 02 - Job# ...
Pdb contained a bug previously that made this not possible This has been fixed for python 3.13 and appears to be back ported to 3.11 and 3.12 per the discussion on this pull request https://github.com/python/cpython/issues/90095#issuecomment-1989517207
In my fastapi app I have a pydantic BaseModel 'Invoice', It has a field 'taxes_list', which is just a list of TaxModel. When I read the docs generated I realize that, there is not not indication that, the taxes_list is a list of TaxModel. In the following picture you can see that taxes list is an array of objects and t...
I am trying to host a nextjs website on iis here is my set up . 1. Website with web.config hosted under default site [![enter image description here][1]][1] 2. Contents of web.config which causes nextjs site . On access of http://localhost/AppWithNode1/SimpleErrorView it should redirect to the nextjs site. ...
As pointed out in the Comment, $ wsl --import was not possible in the clean install state, but after $ wsl --install first. $ wsl --install # install ubuntu by wsl Reboot and enter username, password WSL2 shutdown $ wsl --shutdown Check WSL2 running status. it will be Stopped. NAME at this time i...
No, it is not currently possible for the type checker to tell you if your hint will worsen the LSP's understanding. Both in your example of VSCode (which uses pyright underneath), and mypy. While theoretically possible for type checkers to implement, needing this feature is a red flag. This is because your LSP shou...
I enabled Strict Swift Concurrency Check and get some warnings. I would love to discuss and understand them. This is my code. ``` class DownloadImageAsyncImageLoader { let url = URL(string: "https://picsum.photos/200")! func handleResponse(data: Data?, response: URLResponse?) -> UIImage? { ...
How to solve @Sendable warnings inside completion block
Laravel Nova 4 Format Date in BelongsTo field
|laravel|date|
null
So I am Doing my unit tests with an in memory sql lite database obviously I cant see all the data at all not as if it was a .db file However, when I am looking through my inspector on the local, I only see the expected data. But in the results view tag, I am seeing what can only be described as my test data being s...
Quintic Number Number Counting Hash Function
|python|database|string|validation|formal-verification|
null
When using the type of the first argument of one function as the type of the first argument in another function typescript loses the generic type conditions. Is there a way to make example2 use the same type as example by reference example's argument type. ``` const example = <T,>(args: {a: T, b: T extends number...
You posted a PHOTOGRPAH of ODS output. You cannot tell anything about spaces from either of those. Turn on the plain old LISTING output and look at that. So assuming you ran something like this: data example; LENGTH GROUP $8; INPUT GROUP @10 STRING $3.; LEFT = 'X '; RIGHT = ' ...
i dont know my code would synchronization or asynchronous when users request upload files API , i want asynchronous, dont block my program ``` import { Injectable } from '@nestjs/common'; import { InjectConnection } from '@nestjs/mongoose'; import { Connection } from 'mongoose'; import { GridFSBucket } from 'mo...
|swift|swift5.7|
Indexing in ServiceNow Jelly Report not working
To create a Pandas DataFrame from the scraped data, you can iterate over the <tr> tags, extract the relevant information from each <td> tag, and then append it to a list. Finally, you can use that list to create the DataFrame. Here's how you can do it: ``` import requests from bs4 import BeautifulSoup import pand...
I want to scrape a website without facing rate limitations. After trying free online HTTP proxies, I noticed that not all can access that website. Thus, I need an efficient way to test them and determine which ones work; And since that proxy testing involves significant waiting time, I opted to redesign my code for ...
How to efficiently test hundreds of HTTP proxies for accessing a specific domain?
|python|asynchronous|proxy|aiohttp|httpx|
null
I have to create a custom report on a ServiceNow UI Page using Javascript and HTML/Jelly. Everything is working except for this line: `<td>${jelly.jvar_bucket.timebuckets[idx].totalSystem;} </td>` If I replace `idx` with a number, say 20 or 25, then the report shows as expected. With idx it is all blanks. ...
With a value such as: s = "https://xxx.yyy.com/oauth2/v1/token?grant_type=client_zzzz" Terraform complains, when try to escape the embedded '='. Seemingly, it has no issue, with certain other special chars, such as '?'. Aside from direct escape (\), I also tried format(), with various modifiers. No luck.... ...
Terraform: How to assign a value to a string variable, that includes embedded '=' in the value
|terraform|format|escaping|special-characters|modifier|
null
I suggest to use [`pd.read_html`][1] to read the HTML code directly to dataframe: ```py import re from io import StringIO import pandas as pd import requests res = requests.get("https://fbref.com/en/comps/9/stats/Premier-League-Stats") comp = re.compile("<!--|-->") df = pd.read_html(StringIO(comp.sub(""...
SQLite Nunit Tests is showing me data seeded on Application DB Context
|c#|nunit|
You can add window listeners on [`"maximize"`][1] and [`"unmaximize"`][2] events: ```js mainWindow.on("maximize", () => { mainWindow.webContents.send("maximize"); }); mainWindow.on("unmaximize", () => { mainWindow.webContents.send("unmaximize"); }); ``` And then set IPC listeners on you renderer to c...
I had the same issue, but it was due to permalink setting. You can go without Woo's way, but this other way: add_action( 'init', array( $this, 'successfull_callback' ) ); Then inside the callback you check the URI and proceed...
Here we can use `Arrays.stream()` to get Max Value from a primitive array in Java. int [] numbers = {10,1,8,7,6,5,2}; int maxValue = Arrays.stream(numbers).max().getAsInt(); System.out.println(maxValue);
[Artilliery load testing code][1] I want to use a random string(number) from numbers.json (it's an array of numbers not like usual json file) (number is denoted by 'from' in above mentioned code. click the link) for one complete flow. and also want to randomly select query from queries.json file. I want 4 it...
on my site i am trying to reset my password by e-mail using smtp but when i send a password change request i get this error: [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/35y8Z.png here is my settings.py : EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBacke...
SQL Scheduling Query which results in 5 scheduling slots per day for a given week, regardless if there's job to assign to those slots
|sql|
null
I am creating a `ggplot` with multiple overlapping bar plots. The first underlying bar is filled with color and then I overlay one more set of bars with just an outline to show sub-components. I would like to have each of these bars show up in the legend but I cannot figure out how to do it. I would like a separate leg...
null
null
The correct answer (as of 2024) is: ```pyconsole >>> from pymongo import MongoClient >>> client = MongoClient() >>> list(client.topology_description.server_descriptions()) [('localhost', 27017)] ```
I have added razorpay package and it was displaying in full screen. After that i added, firebase auth, google sign in, facebook signin. Post these updates the razor pay payment screen is shrunk to the middle portion as shown in the image. [![preview](https://i.stack.imgur.com/q1I8X.jpg)](https://i.stack.imgur.com/q1...
I have manually split my data into train and test sets. This is how my data directory looks like. ``` pothole_or_not/ test/ train/ pothole/ road/ ``` And this is my datablock: ``` dls = DataBlock( blocks=(ImageBlock, CategoryBlock), get_items=get_image_files, splitter=Grandpar...
Fastai - GrandparentSplitter - test/valid data not selected
|fast-ai|
null
Good morning, I am having an issue with my SKLabel not showing on my Tutorial SKScene. My code is below, I can't seem to find where I went wrong. When trying to add the SKLabel manually, it works fine. When adding it via code, nothing happens. Where am I going wrong? GameviewController: import UIKit ...
Why isn't my label showing on my Tutorial SKScene?
|swift|sprite-kit|sklabelnode|
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...
const myDiv = document.getelementByID(`DivId`) myDiv.setAtribute(`Id`,`UniqueId`)
It makes no sense to refer to a user model that is abstract. Abstract means that there is no table for that model. Typically abstract models are used to be inherited in other (non-abstract i.e. *concrete*) models. So if you would use an abstract model as user model, then how would you register (i.e. create) new user...
kapt.include.compile.classpath=true or remove `kapt.include.compile.classpath`
Statement 1 counts all the equal courses. E.g. for student A having a `'Math'` course, it counts all the `'Math'` courses because of the condition in the sub-select `c.class = Courses.class`, where `Courses` denotes the current record of the parent select. Statement 2 counts all the courses. I.e., `Count(*)` will al...
I recently posted an entry here in stackoverflow for a specific problem I've encountered after run and did asked a few. It's a similar one but this time I need your thoughts and comments to atleast better up my programming skills. For those who didn't know I'm new at coding in C so some conventions in this language we...
nestjs , stream question, i dont know my code would synchronization or asynchronous
|javascript|typescript|file-upload|nestjs|
null
For Loops - Iteratively create matrices/vectors from columns/unique row values of existing dataframe, and pass to subsequent code
You can try to use the [selenium-print](https://pypi.org/project/selenium-print/) package. It uses selenium's `execute_cdp_cmd` function behind the scenes, which is fairly easy to use. The parameters can be found [here][1]. ```py from selenium import webdriver from selenium.webdriver.chrome.service import Service...
I'm using Node-Addon-Api to create addons in NodeJS. Every 30 second there is a call to the addon's function. Every time the function is called, 4 double arrays, with largest array size of 2400 values, are created. I'm experiencing memory overload, so I was wondering it could be because on these 4 arrays. Do I ne...
Do Node-Addon-Api objects need deconstruction?
IIRC, IntelliJ standard keyboard shortcut for undo is CTRL-SHIFT-Z, so what probably happened is you remapped the shortcut at some point and it just slipped your mind. The settings window can be found under File > Settings. CTRL+ALT+S should work if the shortcut hasn't been changed. In the settings window you should...
```cpp #include <iostream> #include <string> int main() { std::string hash = "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1"; std::cout << "SHA-256 hash in binary format: "; for (char c : hash) { switch (c) { case '0': std::cout << "0000"; break; ...
Sending emails in django using smtp
|python|django|smtp|
I had the same issue, but it was due to permalink setting. You can go without Woo's way, but this other way as last option: add_action( 'init', array( $this, 'successfull_callback' ) ); Then inside the callback you check the URI and proceed...
I'm trying to build minimalistic version of QT 6.x.x for my QtJambi project. Just a QT library for the basic QT classes, QApplication, QMessageBox, QTreeView, QFileIconProvider and all the usual QT widgets. Qt: 6.6.2 OS: Linux I assume, all I need is to build `libQt6Core.so` and for that I need to build jus...
You are using repr with generates a printable representational string of the given object. When you use `<br>` in your string, it gets converted to `&lt;br&gt;`. These `&lt;` and `&gt;` represent the ascii < and > characters so they can be used in an html string without being recognised as tag. Kinda like how we use...
You can use [`str.extract()`](https://docs.pola.rs/py-polars/html/reference/series/api/polars.Series.str.extract.html) to split the parts and then get the resulting number by using [`Expr.replace()`](https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.Expr.replace.html) + [`Expr.pow()`](https://docs.po...
***flutter pub get* shows the error:** /Users/sony/development/flutter/bin/flutter --no-color pub get Running "flutter pub get" in bedrive-flutter... Warning: You are using these overridden dependencies: ! device_info_plus 8.2.2 (10.0.1 available) ! ffi 2.1.2 Running "flutter pub get" in bedriv...
Install the library: brew install boost Select your project name in the Project Navigator, then in the Build Settings tab under Search Paths, double-click to the right of Header Search Paths, then enter the full path to folder: /usr/local/Cellar/boost/1.84.0_1/include/
Try to unload first : ``` /bin/launchctl unload /Library/LaunchAgents/com.company.name.plist ```
I am having an issue. It just published my first project and now I am realising if you add an "/" to the end of the URL it does load in a very different way I cant even explain. When you add a "Trailingslash" some of the Buttons of the Website are not clickable and if I do this with ng serve the font is changing, I can...
I am having a hard time understanding lvalue and rvalue references. Look at this code example #include <iostream> //Returns r-value int Add(int x, int y) { return x + y; } //Return l-value int & Transform(int &x) { x *= x; return x; } void Print(in...
lvalue and rvalue references
I need to send a binary file through axios post request- ``` let data= await axios.post(url, formDataObj,config) ``` here formDataObj is object of [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) and config is an object that contains headers for API This is working fine for me But I wa...
axios post request with formData using AxiosInstance
|javascript|reactjs|axios|
null
First make sure you're on the feature branch: `git checkout feat` If you need to, use `git pull` to update your branches. Then use this command to rebase to the staging branch: `git rebase staging` I hope this helps!
I do two ways that both works: 1. add `J = cp.array(J, dtype=cp.complex128)` 2. switch NVIDIA GeForce GTX 1080 Ti to another gpu NVIDIA GeForce RTX 4090
I developed a small stand alone webserver in Delphi. The procedure is as below: function sum(a,b:string):string;stdcall; begin result:=a+b; end; How can I call it in Vue JS? The web service URL is http://127.0.0.1:8080/soap/iservice1 the WSDL document: <definitions xml...
All right, I had misunderstood the documentation of Stylance. I had to create a bundle with stylance-cli and use this bundle. I'm not sure how I'm supposed to use it though, but I eventually settled on another solution (https://trunkrs.dev/assets/#css)
You can use this .signWith(key, Jwts.SIG.HS256) Full Function public String generateToken(Map<String, Object> extraClaims, UserDetails userDetails) { return Jwts.builder() .claims() .add(extraClaims) .subject(userDetails.get...
I was trying to run the Word Count mapreduce using eclipse, i created a java project and export it to jar then run it with hadoop. This is the code: ``` import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.Has...
Hadoop No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster)
|java|hadoop|mapreduce|
null
I am working on a turn-based multiplayer game and it’s headless build is hosted on PlayFab and multiplayer is built using Fusion SDK. The problem I am facing for the past few days is that when two players are playing the game sometimes the server disconnects with the log showing “PhotonCloudTimeout” and “DisconnectedBy...
Photon Fusion Game Disconnecting Error = DisconnectedByPluginLogic
|unity-game-engine|photon|
null