instruction stringlengths 0 30k ⌀ |
|---|
|excel|vba|excel-2016|excel-tables|listobject| |
I have a list of chars that looks like this ['a'; 'b'; '&'; 'c']. I now want to convert this into a list of strings ["a"; "b"; "&"; "c"] and not one string "ab&c" since in the end, I want to compare two lists with strings. How do I go from a list of characters to a list of strings? Thanks a lot for the help
let ... |
How do I convert a list of chars into a list of strings in F#? |
|list|f#|f#-interactive| |
null |
|excel|vba|if-statement|excel-tables|listobject| |
If you want to use Angular signal withing RxJS chain you need to convert it into Observable using [`toObservable`](https://angular.io/api/core/rxjs-interop/toObservable) provided by `@angular/core/rxjs-interop`:
Then you can use it within `takeUntil()`
```
takeUntil(toObservable(this.WSStatus))
```
Note, that ... |
```jsx
...
const MovieDetails = () => {
...
let { movieId } = useParams();
const [movie, setMovie] = useState(null);
useEffect(() => {
// axios settings
let unmounted = false;
let source = axios.CancelToken.source();
axios.get(`http://localhost:4000/movies/${movieId}`, {
... |
let result = str.replace(/\b((.)\2+)\b|(.)\3+/g, '$1$3');
[demo][1]
[1]: https://regex101.com/r/S5J5a6/1 |
you need to attach a click event listener to the "Place Order" button, Then Inside the event listener, first perform some actions and validations using the `validateOrder()` function. If the validation somehow fails, prevent the default action of the click event, effectively preventing the order from being placed. and ... |
I am new to writing functions and loops in R, and am wanting to iterate a chunk of code across columns in a dataframe, to create a new matrix of results. I am getting stuck with how to iteratively create new objects and matrices using/named after values in a certain column (Site) in my dataframe, to then pass through t... |
I hosted an ANgular app on IIS server. My web config entry has Rewrite url = "/MapInternal" however the url opens the parent Directory instead of Index.html .
Can someone please help what I am missing here?
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<a... |
This works for me:
=SUM(IF( (MONTH(B3:B17)=1)*(C3:C17>0),1,0))
|
pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.9</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springfra... |
Unable to disable the default login page in Spring boot 2.7.9 (Spring security 5.7.7) |
Main Activity not updating intent returns |
|java|android|android-intent| |
null |
Please can you help me with this exercise:
Half Sum Element:
Write a program that inputs n integers and checks whether there is a number among them, which is equal to the sum of all the rest. If there is such an element, print "Yes" + its value, otherwise print - "No" + the difference between the largest element ... |
|spring-boot|maven|jstl| |
I have with two sql statement , which different different result but i do not understand
Here is my data
[enter image description here](https://i.stack.imgur.com/1VTJY.png)
student, class
'A', 'Math'
'B', 'English'
'C', 'Math'
'D', 'Biology'
'E', 'Math'
'F', 'Computer'
'G', 'Math'
'H', 'Math'
'I', 'Math'
... |
Problem with two sql statement with a different in subquery |
|sql|mysql|sql-server|postgresql|mysql-workbench| |
null |
I have a numpy array that contains both sub-arrays and an **integer**:
```
mixed_array = np.array([np.array([1, 2]), np.array([1, 2]), 0])
```
I want to mask the array so that I am left with only the sub-arrays and not the **integer**.
```
mixed_array = np.array([np.array([1, 2]), np.array([1, 2]))
```
I am... |
Numpy: checking sub-array datatypes |
|numpy| |
Opening sheet in SwiftUI view |
|swiftui|view|parameters|diagnostics| |
null |
code:
```
import random
import re
numbuttons = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
operators = ['+', '-', '*', '/']
class Task:
def __init__(self, difficulty = 1):
c = None
self.difficulty = difficulty
self.task = ""
b = ""
if difficulty == 1:
... |
The way i would do it is:
```
WITH raw AS (
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,
D.Name as Family_name,
D.Firstname as first_name,
D.Addre... |
I want to create an Encoder-Decoder Model using the following structure:
- Bert-base-uncased for encoding the input (https://huggingface.co/google-bert/bert-base-uncased)
- Linear layer for connecting the two models using the CLS token of Bert as input
- OPT-125M for decoding using the output of the linear laye... |
Inside my sha256 hash class, there are the following functions.
```
uint32_t shift_right ...
uint32_t rotate_right(uint32_t x, uint32_t n)
{
return ((x >> n) | (x << ((sizeof(x) << 3) - n)));
}
uint32_t rotate_left ...
uint32_t choose ...
uint32_t majority ...
void unpack32(size_t x, uint8_t* ... |
#define rotate_left(x, n) vs uint32_t rotate_left(uint32_t x, uint32_t n) |
|c++| |
null |
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.
What do you see in the SAS log if you add
put group $quote.;
|
The least common type between **STRING** and **INT** is **STRING**.
In Databricks and Spark, when using the `coalesce()` function, the least common type is determined by the order of the arguments.
***Note:when performing an equal to (=) operation, Spark performs implicit type casting. In this case, the STRING '... |
null |
As seen by the error message, AES operating in CBC mode - encrypted bytes must be in multiple of 16-byte blocks.
To achieve this, there are inbuilt methods called `pad` and `unpad`, from the `Crypto.Util.Padding` package, that can be `import`'ed and invoked from there.
Your final code will resemble the following:... |
Encoder-Decoder with Huggingface Models |
|pytorch|huggingface-transformers|autoencoder|huggingface|huggingface-tokenizers| |
Your understanding is correct. If you're using a singleton connection to Redis across your entire application and you're issuing WATCH commands on that connection, all keys watched on that connection will be unwatched when any MULTI/EXEC block is executed. So **you'll be needing a separate connection to ensure that th... |
I'm trying to encrypt "Hello, world!" in C and decrypt in Python, the encryption process results in no errors, but the Python decryption errors with `ValueError: MAC check failed`, and can't seem to find the problem.
C Encryption code:
```
NTSTATUS generateRandomBytes(BYTE *buffer, ULONG length) {
BCRYPT_ALG_... |
I was trying to add new datasets connection in DBeaver. After i enter all the neccessary information, then i press test connect then it came out an error "SqlException".
[enter image description here](https://i.stack.imgur.com/NTYjB.png)
I had download a db2 server edition in my pc and the db2 is working.
[e... |
SqlException in DBeaver24.0.1 when doing datasets connection |
|sql|sql-server|database|db2|dbeaver| |
null |
I tried using `kmalloc()` but it's not providing more than 4MB. Also, can I use ioctl to transfer that large data from a user process to a kernel module? Is there any limitations for the buffer size?
I also read some documentation about `__get_free_page()` and `dma_alloc_coherent()` but these functions also do not p... |
How to allocate 500MB+ physically contiguous memory in a Linux kernel module and copy data to that memory from a userspace process? |
You may not believe it, but insert a `print()` statement between the code that fetched data and the code that you use and put that data as a parameter.
I confirmed that the problem was solved by inserting the `print()` statement.
*Even if it is not necessarily a `print()` statement, it will work the same way if you... |
For those who did not immediately understand.
When you create a NAT, you must select a public network from your VPC and then use that NAT on your private network.
And don't forget to grant the necessary permissions for your codeBuild role.
https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-cont... |
I can't believe it, I think I solved it! Though feels more like winning a lottery of accidentally finding what works.
Use these styles for `body`:
<!-- language: lang-css -->
body {
display: grid;
min-height: 100vh;
}
I fiddled a lot with setting body to `flex`, but it required updating... |
export const sliderSettings = {
slidesPerView: 1, // Corrected property name
spaceBetween: 10, // Corrected property name
breakpoints: {
480: {
slidesPerView: 1,
},
600: {
slidesPerView: 2,
},
750: {
slidesPerView: 3,
},
1100: {
slidesPerView: 4,
... |
The underlying problem is that `printArray` is not designed to print the entire array. It only knows to print the elements between `start` and `end`. It has no idea to print the elements before `start`, and the elements after `end`.
For `printArray` to print all of the elements, you must pass the information to `p... |
|javascript|reactjs|react-hooks|axios|react-testing-library| |
|excel|vba|range|excel-tables|listobject| |
I am trying to scrape football players' data from the website FBRef, I got the data from the website as a `bs4.element.ResultSet` object.
Code:
```
import requests
from bs4 import BeautifulSoup
import pandas as pd
import numpy as np
res = requests.get("https://fbref.com/en/comps/9/stats/Premier-League-Sta... |
Python Beginner: Conveting an HTML document scraped from a website to a dataframe |
|python|pandas|beautifulsoup| |
null |
|java|selenium-webdriver|netbeans|dynamic-pages| |
Here is one dataset
df=data.frame(
cultivar = rep(c("CV1", "CV2"), each = 8L),
part = rep(rep(c("DW1", "DW2"), 2), each = 4L),
Light = rep(rep(c("Light1", "Light2"), 4), each = 2L),
Treatment = rep(c("Treatment 1", "Treatment 2"), 8),
DW_Mean = c(69.2825, 94.82, 57.8025, 90.722... |
<s>As you have not shared the schema of your dataframe, I am assuming your df has an "id" column. You can update it accordingly to any other column as per your requirement.</s>
You can simply apply the [`row_number()`](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.ro... |
***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... |
Considering your expected output, you could do something like this using `dict` comprehension:
```
import numpy as np
filtered_indices = np.where(dataset["site"] == "YALE")[0].tolist()
dataset = {k: np.delete(v, filtered_indices) for k, v in dataset.items()}
```
```none
{'timeseires': array([ 7.39066 , 20.... |
I added the parallel and threadcount lines to surefire plugin configuration in pom file:
```
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.3</version>
<configuration>
<parallel>all</parallel>
... |
The default value is broken.
Changing
```
microsoftOptions.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
```
to
```
microsoftOptions.SignInScheme = "Identity.External";
```
has made it work. |
Regarding unchecked warning: One solution could be to simply do the checks first:
But with the generic type erasure, you have to check the ArrayList type and also all elements. So the code with checks could be something like:
ArrayList<Employee> employeesList = new ArrayList<>();
try (FileInput... |
I'm trying to render a Blender 4 scene, using the command line, on a not supported OpenGL virtual Windows machine using Python, and an error is thrown:
RuntimeError: Error: Error: Reported texture size limit (0px) is lower than output size (1024px).
I'm having the opengl32.dll installed.
The lines raising... |
Blender Python Reported texture size limit error |
|python|blender| |
You have a couple of issues with your code. Firstly, as also mentioned by @maraca, when you encounter a sub-array ending at `j`, you need to count all sub-arrays that start at the same `i` and end at `j`, `j+1`, ..., `N`. Secondly, your loop terminates when you process the final `3` in the array because `j == N`. This ... |
I am using full calendar module, what happens is sometimes events disappear randomly and sometimes it works fine below is my code
server side code:
@OnEvent(REFRESH_EVENT_NAME)
public Object onRefresh() {
String start = request.getParameter("start_time");
String end = request.getParameter("en... |
Events disappear randomly for full calendar module |
|ajax|fullcalendar|tapestry| |
i got a problem with my python script, which is a discord bot. The script detects an "Empty Message", even though the message that has been sent into the server does have content, which are commands. Is there a way to fix this? I haven't found one yet.
@client.event
async def on_message(message):
if message.au... |
I was trying to explore data using Python and this is my code :
`import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv('transactions-pet_store-clean.csv')
common_category_cat = df[df['Product_Line'] == 'Cat'].groupby('Product_Category')['Quantity'].sum().idxmax()
common_... |
How can i fix this error ? Attempt to get argmax of an empty sequence |
|pandas|dataframe|group-by|sklearn-pandas|exploratory-data-analysis| |
null |
App is crashing in sometime unable to find the root cause.
> Java.Lang.IllegalArgumentException: Cannot setMaxLifecycle for Fragment not attached to FragmentManager FragmentManager{f4b285a in null}}
Provide the resolution of this exception, currently using .NET MAUI 7.0 version with Android. |
|.net|maui| |
You don't check anything after first while loop, in fact you could just skip it and get the same result, it is doing absolutely nothing that the next while isn't doing anyway. The second while loop leads to discarding all values not in a 5s range, so it is impossible to check the 30s condition.
Fixed code (also usin... |
After running a flutter project this error message appears. flutter pub get also shows an error too shown below |
|android|ios|flutter|dart|ffi| |
MySQL: merging rows |
I am trying to increase stack size, but keep getting this error after running
```
EDITBIN /STACK:2097152 w3wp.exe :
'fatal error LNK1342: failed to save a backup copy of the binary file to be edited'
```
I am not able to find anything about correcting this online.
I am using vs dev tools 2022, windows serv... |
Why is 'EDITBIN /STACK:2097152 w3wp.exe' cmd is giving me an LNK1342 error? |
|.net|visual-studio|iis|stack| |
null |
guys, i'm new here, so i hope im writting a question that follows the good manners.
I have a Mac OS Sonoma 14.4.1, fully updated and just finished a Python Dev course, so really new to all of it.
Sorry for any good manner trouble i may cause with my post, and i actually searched for people with the same error but... |
Not able to use tkinter in Mac OS Sonoma 14.4.1 and vscode |
|python|macos|tkinter| |
null |
I am using [games_services][1] package for my flutter app but I'm not able to run my app in android emulator, it returns following error:
```bash
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':games_services:compileDebugKotlin'.
> Inconsistent JVM-target compatibility d... |
null |

What is this "Scroll" on safari dev tool?
|
Wondering which React component I can use to display live crypto data fetched from a dex.
I want to be able to filter by price, market cap or percentage.
I see the exactly same component being used on different tools (https://dexscreener.com/, https://www.dextools.io/, https://www.geckoterminal.com/).
Anyone knows t... |