Id int64 4 8.51M | PostTypeId int64 1 7 | AcceptedAnswerId int64 7 75.5M ⌀ | ParentId int64 4 41.8M ⌀ | Score int64 -208 27.7k | ViewCount int64 11 12.4M ⌀ | Body stringlengths 0 45k | Title stringlengths 2 150 ⌀ | ContentLicense stringclasses 3
values | FavoriteCount int64 0 225 ⌀ | CreationDate stringdate 2008-07-31 21:42:52 2011-12-14 18:48:47 | LastActivityDate stringdate 2008-08-01 12:19:17 2023-03-05 04:40:26 | LastEditDate stringdate 2008-08-01 13:54:25 2023-03-05 03:12:45 ⌀ | LastEditorUserId int64 -1 21.3M ⌀ | OwnerUserId int64 -1 21.1M ⌀ | Tags listlengths 1 6 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75,638,007 | 1 | 75,638,038 | null | 0 | 35 | I am new to Windows APIs. I am doing an exercise on printing the computer name to the console. Here is the code I have so far:
```
wchar_t compName[MAX_COMPUTERNAME_LENGTH+1];
DWORD maxSize = MAX_COMPUTERNAME_LENGTH+1 ;
BOOL getName = GetComputerNameW(compName, &maxSize);
wprintf(L"Computer name is: %s",compName);
```... | Printing computer name using GetComputerNameW | CC BY-SA 4.0 | null | 2023-03-04T19:03:34.817 | 2023-03-04T19:13:31.673 | 2023-03-04T19:13:31.673 | 65,863 | 2,494,337 | [
"c",
"winapi"
] |
75,638,012 | 2 | null | 75,076,485 | 0 | null | I guess you've used ESM import..
There is no default export in 'supertest' module.
Try to import it in this way:
```
import { agent as request } from 'supertest'
```
| null | CC BY-SA 4.0 | null | 2023-03-04T19:04:09.520 | 2023-03-04T19:04:09.520 | null | null | 8,553,931 | null |
75,638,010 | 2 | null | 75,207,310 | 0 | null | I also wanted to create a "pretty" dropdown by API.
but my finding is that API does not support detailed Display Style like "chip" (just `True` or `False` on `'showCustomUi'` which maps to "Arrow" or "Plain Text".
A formatting property for dropdowns and the choice for the Display Style definitely exist, but it is not v... | null | CC BY-SA 4.0 | null | 2023-03-04T19:03:53.920 | 2023-03-05T03:23:41.077 | 2023-03-05T03:23:41.077 | 5,856,327 | 5,856,327 | null |
75,638,003 | 1 | null | null | 0 | 18 | I am trying to setup a specific relationship using FluentAPI on 2 entities. See details below
```
public abstract class Entity
{
[Key]
public int Id { get; set; }
}
public class Inventory: Entity
{
public int Version { get; set; }
public string Set_num { get; set; }
[JsonIgnore]
public virtual ... | Entity Framework, Fluent API relationships - many-to-one-or-zero | CC BY-SA 4.0 | null | 2023-03-04T19:02:52.013 | 2023-03-04T19:34:36.813 | 2023-03-04T19:34:36.813 | 13,302 | 797,834 | [
"c#",
"entity-framework-core",
"ef-fluent-api"
] |
75,638,014 | 2 | null | 75,625,043 | 0 | null | If you simply want to redirect to another page, you can use the browser's [location API.](https://developer.mozilla.org/en-US/docs/Web/API/Window/location#example_1_navigate_to_a_new_page)
Most likely, though, you'll want to call Astro using a `fetch` call to an endpoint, sending your form's data:
```
<Box component="f... | null | CC BY-SA 4.0 | null | 2023-03-04T19:04:19.340 | 2023-03-04T19:04:19.340 | null | null | 1,369,488 | null |
75,638,016 | 1 | null | null | -1 | 16 | I'm not new to coding, but kind of new to VS Code. I might be really dumb, but I was wondering if there was a way to get a "Stop Code" button next to the "Run Code" button. I just want it to terminate the code, and I don't want to have to do too much. Is there an extension/setting to do that?
I have searched extensions... | VS Code Stop Button | CC BY-SA 4.0 | null | 2023-03-04T19:04:36.727 | 2023-03-04T19:18:43.813 | 2023-03-04T19:18:43.813 | 11,107,541 | 21,333,083 | [
"visual-studio-code"
] |
75,638,008 | 1 | null | null | 0 | 22 | im trying to run a minecraft server in a docker container with a pipe name,
in my docker image (Dockerfile) im creating and running the fifo like this:
```
FROM ubuntu:latest
ENV jre=openjdk-17-jre
ENV runsv="-Xmx1024M -Xms1024M"
# Install OpenJDK
RUN apt-get update && apt-get install -y $jre
#openjdk-17-jre
# Crea... | cant read fifo - Error : -bash: myfifo: No such file or directory | CC BY-SA 4.0 | null | 2023-03-04T19:03:41.163 | 2023-03-04T21:24:32.027 | 2023-03-04T21:24:32.027 | 17,832,375 | 17,832,375 | [
"node.js",
"bash",
"docker"
] |
75,638,013 | 1 | null | null | 0 | 6 | I have dedicated backend servers to each tenant. I want to redirect
Api calls to right tenant server. These are probable solution I can think of
- When creating developer registeration add tenant info as custom attribute. And use it in proxy. (This has disadvantage that a developer represents tenant)- another solution ... | How to achieve multi tenancy in Apigee | CC BY-SA 4.0 | null | 2023-03-04T19:04:11.337 | 2023-03-04T19:04:11.337 | null | null | 2,000,121 | [
"google-cloud-platform",
"api-gateway",
"apigee"
] |
75,638,020 | 1 | null | null | 0 | 6 | I have a Category entity. User should be able to add multiple Category records at once.
Is it correct if command will contain List of CategoryDTO objects ?
| Implementing Bulk Insert with CQRS Command | CC BY-SA 4.0 | null | 2023-03-04T19:05:05.120 | 2023-03-04T19:05:05.120 | null | null | 6,076,996 | [
".net",
"command",
"cqrs"
] |
75,638,018 | 2 | null | 75,637,888 | 0 | null | your constructor should receive all the needed parameters for example
```
public Car(String model, double milage){
//init the params here
}
```
in the main java file
use the System.in method to get the params from the user
and send them with new Car object.
```
String model = "Toyota"; //this would be filled by the us... | null | CC BY-SA 4.0 | null | 2023-03-04T19:04:59.677 | 2023-03-04T19:04:59.677 | null | null | 20,560,301 | null |
75,638,006 | 2 | null | 74,929,564 | 0 | null | If you use [Phoesion Glow](https://glow.phoesion.com), a framework designed specifically for creating microservices using dotnet, you can have inter-service communication with the [Internal Operation mechanism](https://glow-docs.phoesion.com/tutorials/Service_Interop.html).
Do accomplish this you need to
### 1. Create... | null | CC BY-SA 4.0 | null | 2023-03-04T19:03:17.030 | 2023-03-04T19:03:17.030 | null | null | 1,889,561 | null |
75,638,017 | 2 | null | 75,637,825 | 2 | null | As others have already stated, you really should be using curly braces `{` and `}` to enclose the statements you want executed as part of your `if` `else if`, not only does it make things easier to read but it will also helps prevent bugs such as you are seeing.
Without the curly braces only the first line immediately ... | null | CC BY-SA 4.0 | null | 2023-03-04T19:04:57.950 | 2023-03-04T19:04:57.950 | null | null | 20,716,902 | null |
75,638,019 | 1 | null | null | 0 | 7 | I'm creating a geonode-project app and I want to authenticate to the Geonode API v2, but I cannot find an endpoint to authenticate.
I listed all endpoint of the api using http://localhost:8000/api/v2/ but I cannot find and endpoint to authenticate.
How can I authenticate to the Geonode REST API?
| How to authenticate to Geonode api v2? | CC BY-SA 4.0 | null | 2023-03-04T19:05:02.690 | 2023-03-04T19:23:51.493 | 2023-03-04T19:23:51.493 | 17,562,044 | 13,231,896 | [
"django",
"django-rest-framework"
] |
75,638,021 | 2 | null | 75,637,910 | 0 | null | If I am understanding your problem correctly, I believe you can check if there is a string in DF with an exact match of the values 'date' and 'float' by using the loc method of the DataFrame to select the rows that match the 'date_input' and 'float_input' values.
Then, you can check if the resulting DataFrame is empty ... | null | CC BY-SA 4.0 | null | 2023-03-04T19:05:32.947 | 2023-03-04T19:05:32.947 | null | null | 17,656,839 | null |
75,638,027 | 1 | null | null | -3 | 18 | I want to prevent remote access/screen recording (third party apps like Anydesk, Quicksuppport, Teamviewer etc.)of my servlet web application/Mobile browser in java.
we are using hybrid app we already disabled the remote access for app but unable to disable from the mobile browser.
| prevent my application from remote access/capturing in mobile browser in java | CC BY-SA 4.0 | null | 2023-03-04T19:06:36.190 | 2023-03-04T19:11:05.277 | 2023-03-04T19:11:05.277 | 20,945,047 | 20,945,047 | [
"java",
"servlets"
] |
75,638,023 | 2 | null | 75,637,829 | 0 | null | You could use a closure which returns a function for repeating.
```
function runTheFunctionNTimes(func, n) {
for (let i = 0; i < n; i++) func();
}
function functionWithoutParameters() {
console.log('x');
}
function functionWithAParameter(y) {
return function () {
console.log(y);
};
}
runTheFu... | null | CC BY-SA 4.0 | null | 2023-03-04T19:05:42.977 | 2023-03-04T19:05:42.977 | null | null | 1,447,675 | null |
75,638,011 | 1 | null | null | 2 | 15 | I'm currently working on a school project: making a game using python and pygame library. Most of what happens in this game is when something on the screen is clicked, it should write certain things on the screen for the player to read. (the game is story based and it doesn't have any special action.)
My problem with i... | How to stop sprites from "blinking" when drawn all at once | CC BY-SA 4.0 | null | 2023-03-04T19:04:00.527 | 2023-03-04T19:14:00.337 | null | null | 21,332,903 | [
"python",
"pygame",
"sprite",
"double-buffering"
] |
75,638,025 | 1 | null | null | -1 | 28 | Am using pandas for read dataframe on each line ,but it just read two data ,then stop ,because i need to read csv file thats recieve data from other server, and on each time add lines for sensors ,`channelname_file = pd.read_csv(file_search) for index ,channel in channelname_file.iterrows():`
I try this code ,but give ... | I need to read csv by pandas, when csv write | CC BY-SA 4.0 | null | 2023-03-04T19:05:53.787 | 2023-03-05T00:03:14.017 | null | null | 11,343,510 | [
"python",
"pandas",
"csv"
] |
75,638,028 | 2 | null | 51,587,253 | 0 | null | You can use [invoke](https://docs.cypress.io/api/commands/invoke) function of Cypress:
```
cy.get('#search-simple').invoke('val', 'ddc66ac588c4ae5d70683cb16729a7e8')
```
| null | CC BY-SA 4.0 | null | 2023-03-04T19:06:36.660 | 2023-03-04T19:06:36.660 | null | null | 429,649 | null |
75,638,022 | 2 | null | 75,637,882 | 2 | null | You want to be using the `is_valid` function instead of `cleaned_date`
```
class EditForm(ModelForm):
class Meta:
model = Cast
fields = [
'enddate',
]
def is_valid(self):
valid = super().is_valid()
# Double Check
# 1: if no data was posted, cleaned_... | null | CC BY-SA 4.0 | null | 2023-03-04T19:05:41.623 | 2023-03-04T19:17:48.287 | 2023-03-04T19:17:48.287 | 10,229,768 | 10,229,768 | null |
75,638,029 | 2 | null | 75,637,968 | 2 | null | You cannot mix JS and TS. In your scripts you are using `nodemon app.js` which means that you are starting a regular NodeJS process and it will be restarted should `app.js` or any imported dependencies change.
TS cannot be executed by NodeJS and should be first transformed into JS using `tsc` compiler. For dev mode you... | null | CC BY-SA 4.0 | null | 2023-03-04T19:06:39.360 | 2023-03-04T19:06:39.360 | null | null | 8,144,405 | null |
75,638,034 | 2 | null | 65,051,509 | 0 | null | just run
php artisan optimize
that worked for me
| null | CC BY-SA 4.0 | null | 2023-03-04T19:07:29.547 | 2023-03-04T19:07:29.547 | null | null | 21,333,107 | null |
75,638,031 | 1 | 75,638,040 | null | 0 | 23 | My attempt so far:
```
const myString = 'Hello my name is Barbara but i dont really like the name Barbara I prefer Barb'
const mySubString = myString.substring(
myString.indexOf("Hello") + 6,
myString.lastIndexOf("Barbara")
);
console.log(mySubString)
```
this returns `my name is Barbara but i dont really like ... | How do I get a substring between a string and the first occurrence of another string? | CC BY-SA 4.0 | null | 2023-03-04T19:06:58.707 | 2023-03-04T19:08:55.407 | null | null | 5,309,611 | [
"javascript",
"string"
] |
75,638,015 | 1 | null | null | -3 | 21 | I have an Android service. Every N minutes I want to receive information from the API and check it.
```
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
myschedule_executor = Executors.newScheduledThreadPool(1);
int MIN30 = 30 * 60;
int MIN5 = 5 * 60;
int MIN1 = 60;
int T... | Android service. As soon as the api with the InputStreamReader appears in it, it stops working | CC BY-SA 4.0 | null | 2023-03-04T19:04:26.677 | 2023-03-04T21:29:21.463 | 2023-03-04T21:29:21.463 | 9,616,232 | 9,616,232 | [
"java",
"android",
"android-studio",
"service",
"android-service"
] |
75,638,024 | 1 | 75,638,265 | null | 1 | 43 | It seems like many of the methods for producing GUIDs are pretty conservative, producing guids with an astronomically small chance of collision.
I'm wondering if, when you are producing key for a map of objects which are very unlikely to exceed 100K, it's reasonable to use something other than GUID for a typical busine... | Shorter random string good enough "locally unique" identifiers? | CC BY-SA 4.0 | null | 2023-03-04T19:05:53.550 | 2023-03-04T19:47:34.653 | null | null | 1,023,110 | [
"javascript"
] |
75,638,033 | 2 | null | 75,636,607 | 0 | null | Because using `@SpringJUnitConfig` will just start the spring context in a traditional way but not in the spring-boot way. And those externalise properties to the `application.properties` feature is the spring-boot feature and hence it does not work when the test is started in the non-boot way.
To fix the problem , you... | null | CC BY-SA 4.0 | null | 2023-03-04T19:07:23.227 | 2023-03-04T19:13:32.190 | 2023-03-04T19:13:32.190 | 339,637 | 339,637 | null |
75,638,035 | 1 | null | null | 1 | 22 | I'm trying to implement a parallel algorithm in Rust using Rayon.
It seems to work fine if you can divide up the work ahead of time and assign it to threads. The problem is that I want the worker threads themselves to be able to schedule work and this I'm finding to be much more difficult. I'd love to have some thread ... | Multithreded algorithm where worker threads can schedule work | CC BY-SA 4.0 | null | 2023-03-04T19:07:34.540 | 2023-03-04T19:23:24.393 | 2023-03-04T19:12:02.417 | 68,587 | 2,065,821 | [
"multithreading",
"rust",
"rayon"
] |
75,638,026 | 1 | null | null | 0 | 6 | I have a folder structure resembling the following.
```
.
├── data
│ ├── __init__.py
│ └── fish.csv
└── fish_service.py
```
I would like to access my fish list from `fish_service.py`, by importing them from `data` with something like `from .data import all_fish`, where `all_fish` is a list of what's in the csv.
I ... | How to read a resource file located in the same module from where it read with python importlib resources? | CC BY-SA 4.0 | null | 2023-03-04T19:06:01.473 | 2023-03-04T19:06:01.473 | null | null | 4,735,402 | [
"python",
"python-importlib"
] |
75,638,037 | 2 | null | 75,637,978 | 0 | null | `item.header` will get/check on runtime, it cant be const , remove `const`
```
style: TextStyle(
```
Find more about [What is the difference between the "const" and "final" keywords in Dart?](https://stackoverflow.com/q/50431055/10157127)
| null | CC BY-SA 4.0 | null | 2023-03-04T19:07:36.760 | 2023-03-04T19:07:36.760 | null | null | 10,157,127 | null |
75,638,036 | 2 | null | 61,238,303 | 0 | null | There is a [guidance document for various scenarios here](https://learn.microsoft.com/en-us/azure/devops/integrate/et-started/authentication/authentication-guidance?view=azure-devops)
But I believe that using a PAT (personal access token) will be simplest of the solutions as this is the only one that is listed as non i... | null | CC BY-SA 4.0 | null | 2023-03-04T19:07:35.477 | 2023-03-04T19:07:35.477 | null | null | 2,903,863 | null |
75,638,038 | 2 | null | 75,638,007 | -1 | null | The format specifier `%s` is for printing a string pointed at by `char*`, even in `wprintf`.
You should use format specifier `%ls` to print a string of wide characters.
[printf, _printf_l, wprintf, _wprintf_l | Microsoft Learn](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/printf-printf-l-wprintf-wp... | null | CC BY-SA 4.0 | null | 2023-03-04T19:07:58.627 | 2023-03-04T19:07:58.627 | null | null | 4,062,354 | null |
75,638,040 | 2 | null | 75,638,031 | 2 | null | Don't use `lastIndexOf` if you want the first occurrence. `indexOf` gives the index of the first occurrence.
```
const myString = 'Hello my name is Barbara but i dont really like the name Barbara I prefer Barb'
const mySubString = myString.substring(
myString.indexOf("Hello") + 6,
myString.indexOf("Barbara") - 1
... | null | CC BY-SA 4.0 | null | 2023-03-04T19:08:11.280 | 2023-03-04T19:08:55.407 | 2023-03-04T19:08:55.407 | 9,513,184 | 9,513,184 | null |
75,638,043 | 2 | null | 69,276,530 | 0 | null | Just read the documentation:
> The default approach for packaging is to directly map the nested file structure at compile time — relative to the compile-time command prompt directory — to the root of the virtual file system. The @ symbol can be used in a path at build time to explicitly specify where the resource will ... | null | CC BY-SA 4.0 | null | 2023-03-04T19:08:35.343 | 2023-03-04T19:08:35.343 | null | null | 21,333,115 | null |
75,638,044 | 1 | null | null | -2 | 29 | on aws EC2 instance I made a git repo and created 2 branches (master , branch1).
learning git conflict topic...
I created a file on both the branches with the same name and different codes inside it..
after adding, commiting and merging two branches I m getting following error...
```
git merge branch1
error: Merging i... | Hi I'm new to learning Git and facing a silly issue | CC BY-SA 4.0 | null | 2023-03-04T19:08:50.237 | 2023-03-04T22:51:06.323 | 2023-03-04T22:51:06.323 | 11,286,032 | 21,333,032 | [
"linux",
"git"
] |
75,638,041 | 2 | null | 75,637,900 | 0 | null | On the Custom Domains tab where you are trying to add your domain, there are instructions to configure CName record on your DNS. Have you followed the steps for direct or indirect validation?
Configure a custom domain for accessing blob data in your Azure storage account, like [www.contoso.com](http://www.contoso.com).... | null | CC BY-SA 4.0 | null | 2023-03-04T19:08:29.547 | 2023-03-04T19:08:29.547 | null | null | 13,054,846 | null |
75,638,049 | 2 | null | 75,634,315 | 0 | null | If you mean that it fell from an environment and then show game over. You only need the following simple code.
```
[SerializeField]
private float fallYThreshold = -10; // Limit y fall
private void Update()
{
if (transform.position.y <= fallYThreshold)
{
GameOver() //Run game over method here too
}
}... | null | CC BY-SA 4.0 | null | 2023-03-04T19:09:24.237 | 2023-03-04T19:09:24.237 | null | null | 5,740,243 | null |
75,638,047 | 1 | null | null | 0 | 12 | How can I find the arguments of the verb "see" in a text using .children function?
I first filtered the occurrences of the verb "see" in the text by using re.findall function and then used: children = nlp(see)[1].children
for child in children:
print(child.text)
I didn't get any output.
If I put just one sentence, I r... | How can I find the arguments of a verb in a text (multiple sentences) using .children function? | CC BY-SA 4.0 | null | 2023-03-04T19:09:16.593 | 2023-03-04T19:09:16.593 | null | null | 21,333,080 | [
"jupyter"
] |
75,638,032 | 1 | null | null | 0 | 18 | I am not able to create the Docker image as provide the below error
> ADD failed: file not found in build context or excluded by
.dockerignore: stat target/spring-boot-docker.jar: file does not exist
Dockerfile
```
FROM openjdk:17
EXPOSE 9090
ADD target/spring-boot-docker.jar spring-boot-docker.jar
ENTRYPOINT [ "java",... | not able to create the docker image: target/spring-boot-docker.jar: file does not exist | CC BY-SA 4.0 | null | 2023-03-04T19:07:17.697 | 2023-03-04T21:39:10.163 | 2023-03-04T21:39:10.163 | 4,420,967 | 5,256,337 | [
"spring-boot",
"docker",
"dockerfile",
"dockerhub"
] |
75,638,048 | 2 | null | 28,839,246 | 0 | null | As a small but very important addition to the answer from @kingjr: I expect that many developers will want to show this KDE in a polar projection, as in
```
import matplotlib.pyplot as plt
import numpy as np
from numpy.random import vonmises
def vonmises_kde(data, kappa, n_bins=100):
from scipy.special import i0
... | null | CC BY-SA 4.0 | null | 2023-03-04T19:09:19.327 | 2023-03-04T19:09:19.327 | null | null | 313,768 | null |
75,638,046 | 2 | null | 75,576,426 | 0 | null | The trick is that permissions in Azure DevOps are managed in multiple places for individual services. The good news is that you can use the same user groups everywhere.
To view only existing Sprint's work Items, the predefined role should be what you need. Or the same set of permissions, as described in the [documenta... | null | CC BY-SA 4.0 | null | 2023-03-04T19:09:10.260 | 2023-03-04T19:09:10.260 | null | null | 11,035,142 | null |
75,638,051 | 2 | null | 75,637,772 | 0 | null | You can use `where` method of `List` for that:
(`term` is the search term, substitute it with `searchcontroller.text` in your case)
```
final results =
subjects.where((item) => item.chapter == term || item.lesson == term);
```
This is case sensitive and for full match. If you need case insensitive:
```
final resul... | null | CC BY-SA 4.0 | null | 2023-03-04T19:09:49.453 | 2023-03-04T19:09:49.453 | null | null | 14,726,230 | null |
75,638,052 | 1 | null | null | 1 | 21 | Which branch is checked out on `pull_request` event in GitHub workflow?
For example: Let's say I have a branch `feature` which has been created from `master`, and I create a Pull Request from `feature` to `master` (`master <- feature`), and suppose I have the following code in the workflow files for both the branches,... | Which branch is checked out on pull request event in GitHub workflow? | CC BY-SA 4.0 | null | 2023-03-04T19:09:58.370 | 2023-03-04T23:56:21.727 | 2023-03-04T19:19:02.270 | 21,333,090 | 21,333,090 | [
"github-actions"
] |
75,638,050 | 2 | null | 75,637,007 | 0 | null | Based on the 4th code example in your question (which looks like it was taken from @Guimote's deleted answer), I added some optimizations:
- `itertools.combinations`- `dict[name, sum]``list[tuple[sum, name]]``sorted``min`- `ONLY_SHOW_TOP_ITEMS``results``math.comb(ROWS, MAX_SELECTED_ROWS)`-
The code needs ~15MB RAM and... | null | CC BY-SA 4.0 | null | 2023-03-04T19:09:43.970 | 2023-03-04T19:09:43.970 | null | null | 6,074,182 | null |
75,638,039 | 1 | null | null | 0 | 19 | The problem sounds strange, I don't know how it appeared, everything on the server worked well.
I have a complex algorithm that processes a couple of thousand entries in the database every minute and updates them. It runs in about 10-15 seconds.
### How I am runing this
1. On the server in cron every minute I call ... | Laravel custom artisan command won't run without optimize:clear | CC BY-SA 4.0 | null | 2023-03-04T19:08:01.453 | 2023-03-04T20:24:18.157 | 2023-03-04T20:21:13.307 | 1,998,801 | 12,615,036 | [
"php",
"laravel",
"queue"
] |
75,638,053 | 2 | null | 75,637,997 | 1 | null | You're creating a much more complex structure than you need, full of lists and references, just create the dict directly if you can
```
data = {
"STAGE0": "value0", # single value
"STAGE1": ["value1"], # value in list
}
```
```
>>> print(yaml.dump(data))
STAGE0: value0
STAGE1:
- value1
```
or if you're am... | null | CC BY-SA 4.0 | null | 2023-03-04T19:10:02.713 | 2023-03-04T19:20:09.770 | 2023-03-04T19:20:09.770 | 4,541,045 | 4,541,045 | null |
75,638,054 | 1 | null | null | 0 | 31 | I have one csv file:
```
year;month;day;hour;min;sec;temperature
2022;10;27;13;36;42;5.835
2022;10;27;14;36;42;6.435
2022;10;27;15;36;42;6.335
2022;10;27;16;36;42;6.435
```
And I would like to plot a simple graph from it. I am not able to combine separate datetime parts. This is my code:
```
import pandas as pd
import... | Pandas date parsing from CSV file | CC BY-SA 4.0 | null | 2023-03-04T19:10:10.653 | 2023-03-04T19:55:05.837 | 2023-03-04T19:17:07.643 | 14,079,993 | 14,079,993 | [
"python",
"pandas",
"matplotlib",
"datetime",
"date-parsing"
] |
75,638,059 | 2 | null | 75,638,009 | 0 | null | Right click on cells, choose "Format cells...". In "Number" tab choose "Date" category and scroll until you find your desired format. Select and press "Ok":
[](https://i.stack.imgur.com/tmbgI.png)
| null | CC BY-SA 4.0 | null | 2023-03-04T19:10:46.137 | 2023-03-04T19:10:46.137 | null | null | 11,222,393 | null |
75,638,056 | 1 | null | null | 0 | 26 | {
"result": "success",
"base_code": "AFN",
"rates": {
"USD": 1,
"AED": 3.6725,
"AFN": 89.015484,
"ALL": 108.195795
}
}
In kotlin we parse like that...
`val jsonObj = JSONObject("${result.body()}")`
`val rate = jsonObj.get("rates").get("USD")`
But I want to do it in Flutter dart. How can we achieve this?. Keep in mind t... | How to parse json data without model class in Flutter and get single value? | CC BY-SA 4.0 | null | 2023-03-04T19:10:25.117 | 2023-03-05T00:38:47.297 | null | null | 14,861,313 | [
"json",
"flutter",
"dart",
"parsing"
] |
75,638,045 | 1 | 75,638,108 | null | 1 | 16 | I built a simple moving average trading system like so:
```
import pandas as pd
import numpy as np
def trendfunc(f1,fastnum,slownum):
f1['Change'] = f1['Close'].pct_change()
f1['Fast'] = f1['Close'].rolling(window=fastnum,center=False).mean()
f1['Slow'] = f1['Close'].rolling(window=slownum,center=False).m... | How to loop through variables w/ trend trading system | CC BY-SA 4.0 | null | 2023-03-04T19:09:09.610 | 2023-03-04T19:17:05.900 | null | null | 4,503,546 | [
"python",
"pandas",
"dataframe",
"loops"
] |
75,638,055 | 2 | null | 74,666,572 | 0 | null | >
Answered by [@jarmod](https://stackoverflow.com/a/74668927/9403724).
### How to place it working?
Thanks to [@EzyHoo](https://stackoverflow.com/a/75630008/9403724) tip! :D
Using [AWS SDK v2](https://mvnrepository.com/artifact/software.amazon.awssdk/sqs):
```
SqsClient sqs = SqsClient.builder()
.credentialsPro... | null | CC BY-SA 4.0 | null | 2023-03-04T19:10:18.700 | 2023-03-04T19:10:18.700 | null | null | 9,403,724 | null |
75,638,061 | 2 | null | 72,678,198 | 0 | null | You have not provided Postgres with instructions on how to populate the id column for new records. It needs to be declared as a [SERIAL](https://www.postgresql.org/docs/8.1/static/datatype.html#DATATYPE-SERIAL) column:
Create your table as follows:
```
CREATE TABLE store (
id SERIAL,
store_name character vary... | null | CC BY-SA 4.0 | null | 2023-03-04T19:11:08.910 | 2023-03-04T19:11:08.910 | null | null | 8,041,003 | null |
75,638,068 | 2 | null | 75,637,990 | 0 | null | Save your singleton instance.
```
private void Start() => instance = this;
```
| null | CC BY-SA 4.0 | null | 2023-03-04T19:12:12.293 | 2023-03-04T19:12:12.293 | null | null | 5,740,243 | null |
75,638,062 | 2 | null | 75,632,612 | 0 | null | First, here is the baseline timing I have on my machine when executing the code after the `# Speed up from here` comment :
```
5.02 ms ± 134 µs per loop (mean ± std. dev. of 10 runs, 1,000 loops each)
```
You will save time by appending values to a list and then creating a dataframe, rather than using `pd.concat()`.
`... | null | CC BY-SA 4.0 | null | 2023-03-04T19:11:17.053 | 2023-03-04T19:11:17.053 | null | null | 11,080,037 | null |
75,638,065 | 1 | null | null | 0 | 20 | I cannot run code or import any data without receiving these warnings. I have no clue why this is happening I have not seen this. [](https://i.stack.imgur.com/02qx0.png)
here is another error when I am trying to update the package
[](https://i.stack.imgur.com/gPgts.jpg)
I have tried restarting
| I am getting Rlang errors in R and I am unable to do any of my coding or import data | CC BY-SA 4.0 | null | 2023-03-04T19:11:37.100 | 2023-03-04T21:02:23.400 | 2023-03-04T19:16:56.420 | 6,123,824 | 21,333,113 | [
"r",
"rlang"
] |
75,638,067 | 2 | null | 75,637,579 | 2 | null | You cannot limit S3 storage space usage with IAM.
If you think about it, you'd need a database to keep track of user-bucket usage statistics to do something like this. IAM is simpler than that, this task is out of the scope of IAM. You'd have to come up with your own solution. For example, you could [use Lambda](https:... | null | CC BY-SA 4.0 | null | 2023-03-04T19:12:11.597 | 2023-03-04T19:12:11.597 | null | null | 10,369,131 | null |
75,638,069 | 1 | 75,638,085 | null | -3 | 24 | I have a ( object with nested Objects ):
```
let list = {
val: 3,
next: {
val: 4,
next: {
val: 2,
next: {
val: 7,
next: null,
},
},
},
};
```
I want to get only `val`... | How to traverse a Linked List in Javascript? | CC BY-SA 4.0 | null | 2023-03-04T19:12:13.547 | 2023-03-04T19:13:58.113 | null | null | 7,551,963 | [
"javascript",
"linked-list"
] |
75,638,060 | 1 | 75,638,290 | null | 1 | 20 | I am trying to use FastAPI for a new application that looks at events in the town I live in.
Here's my FastAPI backend:
```
from fastapi import FastAPI
from utils import FireBaseConnection
from pydantic import BaseModel
app = FastAPI()
class Data(BaseModel):
name: str
@app.post("/event")
async def create_events(... | FastAPI and Python requests 422 error problem | CC BY-SA 4.0 | null | 2023-03-04T19:10:51.953 | 2023-03-04T20:03:42.480 | 2023-03-04T20:03:42.480 | 17,865,804 | 19,582,765 | [
"python",
"python-requests",
"fastapi"
] |
75,638,064 | 2 | null | 34,111,476 | 0 | null | You can sort your slice via [sort.Slice()](https://pkg.go.dev/sort#Slice) and then make the slice unique by overwriting non-unique elements with following unique ones:
```
func Unique[T comparable](xs []T) []T {
n := len(xs)
if n == 0 {
return xs
}
j := 0
for i := 1; i < n; i++ {
if ... | null | CC BY-SA 4.0 | null | 2023-03-04T19:11:24.517 | 2023-03-04T19:21:52.087 | 2023-03-04T19:21:52.087 | 427,158 | 427,158 | null |
75,638,063 | 2 | null | 75,637,920 | 0 | null | To get the cell with id 11 use `document.querySelector('td[id="11"]')`, And Note that dark is not a valid color value in `CSS`, use black instead.
```
function bthClick() {
// select the cell with id "11"
let cell = document.querySelector('td[id="11"]');
// set its background color to black and text color to ... | null | CC BY-SA 4.0 | null | 2023-03-04T19:11:22.693 | 2023-03-04T19:23:07.320 | 2023-03-04T19:23:07.320 | 17,925,361 | 17,925,361 | null |
75,638,070 | 1 | null | null | 0 | 15 | I tried gaining write permissions to change an html file on a remote server that runs fedora using:
`sudo chown -R $USER:$USER /var/www`
After entering this line in the terminal connected to the terminal on the server with SSH I am no longer able to connect to the server with FileZilla or establish a new SSH connection... | Unable to connect to remote server after: sudo chown -R $USER:$USER /var/www | CC BY-SA 4.0 | null | 2023-03-04T19:12:22.073 | 2023-03-04T19:12:22.073 | null | null | 21,333,081 | [
"linux",
"ssh",
"permissions",
"fedora",
"remote-server"
] |
75,638,079 | 1 | null | null | -2 | 14 | La idea es la siguiente, quiero que al momento de agregar una película esa pasa con su enlace de reproducción y no tenga que hacer ese proceso manualmente, tengo una página que me brinda una API para la obtención de los enlaces, pero no sé cómo implementar esa API para que me traiga los enlaces cuando agrego una pelícu... | How to add Autombed in Dooo.? | CC BY-SA 4.0 | null | 2023-03-04T19:13:13.463 | 2023-03-04T19:13:13.463 | null | null | 21,333,101 | [
"java",
"android",
"kotlin"
] |
75,638,077 | 1 | null | null | -1 | 10 | I`m looking for free stable solution of bypassing captchas (hcaptcha specifically). I am aware of some 2captcha.com-like services and everything, but this does not satisfy me. I am thinking about some solutions using the machine learning or bugs. Appreciate any ideas ;)
I have tried [a solution](https://github.com/aven... | How to bypass the hcaptcha in selenium python code for free? | CC BY-SA 4.0 | null | 2023-03-04T19:12:56.373 | 2023-03-04T19:12:56.373 | null | null | 20,694,462 | [
"python",
"selenium-webdriver",
"captcha",
"browser-automation",
"hcaptcha"
] |
75,638,075 | 2 | null | 75,637,289 | 0 | null | Since you are passing `receipt_pk` as URL parameter so the `add_rent_payment` view should also recieve it as an argument instead of `pk`, like so:
```
def add_rent_payment(request, receipt_pk):
#...
```
> Always add `/` at the end of every route so in urls.py:
```
urlpatterns = [
path('receipt/<str:pk>/', vie... | null | CC BY-SA 4.0 | null | 2023-03-04T19:12:50.813 | 2023-03-04T19:12:50.813 | null | null | 17,562,044 | null |
75,638,080 | 1 | null | null | 0 | 13 | I am building a set of haxe externs (AKA bindings) for Neovim APIs. However, the number of methods is huge and I am using some metaprogramming techniques to do it automatically.
I just reached the limit of what plain regular expressions can achieve, and I decided to write a proper parser. However, I don't want to build... | Is it possible to write a Lua parser that only cares about function definitions? | CC BY-SA 4.0 | null | 2023-03-04T19:13:20.560 | 2023-03-04T19:13:20.560 | null | null | 1,734,815 | [
"parsing",
"lua"
] |
75,638,081 | 2 | null | 70,138,527 | 0 | null | The highest rated answer is not the best in my opinion. There are too many properties declared there. Just this is enough:
```
transform: translate3d(0, 0, 0);
```
Source:
[https://graffino.com/til/raw/CjT2jrcLHP-how-to-fix-filter-blur-performance-issue-in-safari](https://graffino.com/til/raw/CjT2jrcLHP-how-to-fix-f... | null | CC BY-SA 4.0 | null | 2023-03-04T19:13:25.060 | 2023-03-04T19:13:25.060 | null | null | 14,047,631 | null |
75,638,082 | 2 | null | 75,638,056 | 1 | null | You're doing in correct way but you're trying to access the value which is not there.
You can try following thing:
```
void getCurrenciesRatesFromServer() {
repository.getCurrenciesRates(selectedFromCountryCode).then((value) async {
var response = json.decode(value);
log("${response['result']}"); //This will ... | null | CC BY-SA 4.0 | null | 2023-03-04T19:13:25.157 | 2023-03-05T00:38:47.297 | 2023-03-05T00:38:47.297 | 16,124,033 | 13,954,519 | null |
75,638,084 | 2 | null | 72,783,634 | 0 | null | Solutions provided here are full of boilerplate code. Here is simple solution using and :
```
<p>
Today I spent most of the day researching ways to ...
<span class="inline-flex items-baseline">
<img src="path/to/image.jpg" alt="" class="self-center w-5 h-5 rounded-full mx-1" />
<span>Kramer</span>
</span>
keep... | null | CC BY-SA 4.0 | null | 2023-03-04T19:13:35.033 | 2023-03-04T19:13:35.033 | null | null | 3,448,304 | null |
75,638,083 | 1 | null | null | 0 | 3 | I'm using plotly.js to plot scientific data.
I’m trying to reverse the colorscale orientation.
Plotly draw vertical colorbar with max-value on top and min value on bottom.
Is possible to invert this feature? (min-value on top and max-value on botton)
I’ve tried the “reversescale” feature, but it inverts the colorscale ... | Plotly.js - Is there a way to draw vertical colorbar with minimum value on top and maximum on bottom? | CC BY-SA 4.0 | null | 2023-03-04T19:13:33.893 | 2023-03-04T19:13:33.893 | null | null | 9,798,586 | [
"javascript",
"plotly",
"plotly.js"
] |
75,638,085 | 2 | null | 75,638,069 | 3 | null | You can use this generator function:
```
function* iterList(list) {
while (list) {
yield list.val;
list = list.next;
}
}
let list = {val:3,next:{val:4,next:{val:2,next:{val:7,next: null}}}};
// 1. To traverse the list:
for (const val of iterList(list)) console.log(val);
// 2. Or to create an ... | null | CC BY-SA 4.0 | null | 2023-03-04T19:13:58.113 | 2023-03-04T19:13:58.113 | null | null | 5,459,839 | null |
75,638,057 | 1 | null | null | -1 | 23 | Edit: This is for showcasing timing differences between GPUs and CPUs - it is not meant to be used in any real application. The goal is to showcase 2 different algorithms being used synchronously and asynchronously on both a CPU and a GPU. There will be a long sorted list at the end of each run. The function is copied ... | Typing error with numba python. Unable to determine the type of an array of ints | CC BY-SA 4.0 | null | 2023-03-04T19:10:33.197 | 2023-03-05T05:05:56.357 | 2023-03-05T05:05:56.357 | 681,865 | 18,385,989 | [
"python",
"cuda",
"gpu",
"numba"
] |
75,638,086 | 2 | null | 75,637,808 | 0 | null | This is just an error in the clientside javascript rather than with the CosmosDB service itself.
It contains the following code (in FetchResult.js)
```
if (feedResponse) {
this.feedResponse = feedResponse;
this.fetchResultType = FetchResultType.Result;
}
else {
this.error = error;
... | null | CC BY-SA 4.0 | null | 2023-03-04T19:13:59.907 | 2023-03-04T19:35:22.790 | 2023-03-04T19:35:22.790 | 73,226 | 73,226 | null |
75,638,073 | 1 | 75,638,271 | null | 2 | 32 | I am Using a slightly modified version of the HID Example from [melbournedeveloper/Device.NET library](https://melbournedeveloper.github.io/Device.Net/index.html) to poll an HID device every 100ms with a `TransferResult(byte[] data, uint bytesRead)` callback, using DotMemory the returned TransferResult seems to be leak... | Observable.FromAsync memory leaks | CC BY-SA 4.0 | null | 2023-03-04T19:12:40.410 | 2023-03-04T20:38:41.707 | 2023-03-04T20:38:41.707 | 2,919,656 | 2,919,656 | [
"c#",
"multithreading",
"memory-leaks",
"observable",
"hid"
] |
75,638,087 | 2 | null | 75,638,011 | 2 | null | The rectangle passed to [pygame.display.update()](https://www.pygame.org/docs/ref/display.html#pygame.display.update) is not intended to limit the screen update to that area, but at least to update that area in the most efficient way. Multiple calls to `pygame.display.update()` or `pygame.display.flip()` cause flickeri... | null | CC BY-SA 4.0 | null | 2023-03-04T19:14:00.337 | 2023-03-04T19:14:00.337 | null | null | 5,577,765 | null |
75,638,088 | 2 | null | 75,150,887 | 0 | null | Function is used to load vertices from the CSV files. Sample format is showing below:
```
load_labels_from_file('<graph name>', '<label name>','<file path>')
```
As well as if we want to exclude the id field, then we need to add fourth parameter as false which such as:
*** Use this when there is no id field in the fi... | null | CC BY-SA 4.0 | null | 2023-03-04T19:14:09.043 | 2023-03-04T19:14:09.043 | null | null | 8,156,475 | null |
75,638,089 | 1 | null | null | 0 | 14 | When I try to upload a csv file to a table in my database and I get this error:
> #1045 - Access denied for user 'da_sso_qZw9wgn1S'@'localhost' (using password: YES).
As you may have guessed, I didn't create that user. I only have 2 users listed and 'da_sso_qZw9wgn1S' ain't one of them. When I run the command
```
SELEC... | Why is my phpmyadmin showing a user for my database that doesn't exist? | CC BY-SA 4.0 | null | 2023-03-04T19:14:10.490 | 2023-03-05T01:40:46.290 | 2023-03-05T01:40:46.290 | 17,566,517 | 17,566,517 | [
"mysql",
"phpmyadmin"
] |
75,638,090 | 1 | null | null | -1 | 11 | On the local server, the file contains `var array = '→';`
And as a result, the browser shows `var array = 'в†’';` What kind of symbol is this, and how to work with it?
The task is to read the "arrow" along with other data directly from the page and place it in a `js` file, after which you need to output the same arrow ... | Why is the arrow symbol converted to something else? | CC BY-SA 4.0 | null | 2023-03-04T19:14:11.367 | 2023-03-04T21:01:58.157 | 2023-03-04T21:01:58.157 | 3,439,404 | 21,333,079 | [
"character-encoding",
"symbols"
] |
75,638,093 | 2 | null | 75,637,652 | 0 | null | your are using old version of `Speech_to_text` and this version not `null-safty` .
[](https://i.stack.imgur.com/v7Gor.png)
you can use update from [this link](https://pub.dev/packages/speech_to_text/install) and install version `6.1.1` for Dec-2022 .
| null | CC BY-SA 4.0 | null | 2023-03-04T19:14:21.277 | 2023-03-04T19:14:21.277 | null | null | 9,854,260 | null |
75,638,091 | 2 | null | 73,936,766 | 0 | null | Looking at the source code of the original albatros() function, p-values with an absolute value > 0.5 are not expected. Values greater than this are used to code p-values for negative associations. This introduces an imprecision into the code as p-values will never get closer to the null than |p| = 0.5.
That said the f... | null | CC BY-SA 4.0 | null | 2023-03-04T19:14:14.317 | 2023-03-04T19:14:54.390 | 2023-03-04T19:14:54.390 | 21,333,134 | 21,333,134 | null |
75,638,074 | 1 | null | null | 0 | 40 | Anyone have a clue why this dropdown isn't behaving as expected? It's working on normal resizes as shown first in the gif, but not in chromes responsiveness debug thing. It seems the window width is maybe not being updated correctly? I know `useEffect` applies after the rendering cycle, so I tried using `useLayoutEffec... | Why is resizing not working correctly on this element in react? | CC BY-SA 4.0 | null | 2023-03-04T19:12:41.663 | 2023-03-04T21:52:15.900 | 2023-03-04T21:52:15.900 | 9,991,005 | 9,991,005 | [
"javascript",
"css",
"reactjs"
] |
75,638,094 | 2 | null | 75,637,772 | 0 | null | To search a list of objects based on both chapter and lesson properties, you can use the method of the Iterable class. The where method returns a new iterable that only contains the elements of the original iterable that meet the specified condition.
Here's how you can modify your searchSubjects method to perform the... | null | CC BY-SA 4.0 | null | 2023-03-04T19:14:29.497 | 2023-03-04T19:14:29.497 | null | null | 4,667,109 | null |
75,638,095 | 1 | null | null | 0 | 19 | I am building a QUIZ app in React.
I have all my data inside a JSON file called `db.json`, a simple array of objects as shown [here](https://i.stack.imgur.com/Vcenp.png)
Then I have the `App` Component in which I pass down the data on two components, the `QuestionSection` and then the `ResultsSection`. ([result_1](http... | Compare two values in React | CC BY-SA 4.0 | null | 2023-03-04T19:14:35.627 | 2023-03-04T19:35:20.013 | 2023-03-04T19:35:20.013 | 12,572,405 | 17,839,765 | [
"javascript",
"reactjs",
"arrays",
"react-hooks",
"onclick"
] |
75,638,092 | 1 | 75,638,323 | null | 0 | 39 |
```
name% ./myshell
name: cd
Current working dir: /nfs/homes/name
name: cd /bin
Current working dir: /usr/bin
name: exit
```
Here I was working with getcwd(). But also when I pass pwd to Execve it is the same resulut.
I fixed the problem.
But I want to know why this happens and are there other folders that are not wo... | Execve cd /bin pwd [C] | CC BY-SA 4.0 | null | 2023-03-04T19:14:16.023 | 2023-03-04T20:31:34.417 | 2023-03-04T19:34:51.087 | 9,430,133 | 21,043,254 | [
"c",
"bin",
"chdir",
"execve",
"getcwd"
] |
75,638,076 | 1 | null | null | -1 | 21 | I tried to recreate Conways game of life using pygame, but something doesn't work with the creation of new squares or with the counting of living neighbors.
```
import pygame, sys
screen_size = (800,800)
pygame.init()
screen = pygame.display.set_mode(screen_size)
clock = pygame.time.Clock()
counter=0
mouse_pos = []... | Strange behavior in a Conways Game of Life clone | CC BY-SA 4.0 | null | 2023-03-04T19:12:53.373 | 2023-03-04T19:20:56.303 | 2023-03-04T19:19:11.647 | 5,577,765 | 15,492,709 | [
"python",
"pygame",
"conways-game-of-life"
] |
75,638,102 | 2 | null | 75,637,904 | 0 | null | It seems that the useEffect is dependent on the `auth` state that you're importing. The useEffect will re-run everytime the variable or states within its dependency array are changed. In your case, the dependency array is empty.
Try this.
```
useEffect(() => {
//rest of the code here
} , [auth])
```
| null | CC BY-SA 4.0 | null | 2023-03-04T19:15:22.883 | 2023-03-04T19:15:22.883 | null | null | 12,240,988 | null |
75,638,099 | 2 | null | 75,636,345 | 0 | null | The fact that you can't find it in [the reference page listing symbol icons](https://code.visualstudio.com/api/references/icons-in-labels) is probably because you're using an icon theme. If you disable that theme, you'll see it as:  defined on a subclass by the library user? | CC BY-SA 4.0 | null | 2023-03-04T19:14:50.247 | 2023-03-04T19:14:50.247 | null | null | 9,280,460 | [
"javascript",
"visual-studio-code",
"intellisense",
"jsdoc"
] |
75,638,100 | 1 | null | null | 0 | 15 | I have a bunch of path-to-purchase chains, and the more I have, the more I'm getting stuck about building the graph and calculating the removal effect.
Let's imagine we have 5 different chains:
1. start -> facebook -> google -> remarketing -> conversion
2. start -> facebook -> google -> null
3. start -> facebook -> re... | Python: how to calculate removal effect correctly using Markov Chains | CC BY-SA 4.0 | null | 2023-03-04T19:15:15.420 | 2023-03-04T19:15:15.420 | null | null | 6,840,039 | [
"python",
"graph",
"markov-chains"
] |
75,638,104 | 2 | null | 75,637,999 | 0 | null | It's nothing to do with Typescript, and you should not use `cy.wait(5000)` anyway.
Instead use [timeout](https://docs.cypress.io/guides/references/configuration#Timeouts)
>
Timeouts are a core concept you should understand well. The default values listed here are meaningful.
Since the delay is 8 seconds, use this
```
... | null | CC BY-SA 4.0 | null | 2023-03-04T19:15:45.493 | 2023-03-04T19:15:45.493 | null | null | 16,695,029 | null |
75,638,110 | 2 | null | 40,483,034 | 0 | null | You can install [react-native-modal](https://www.npmjs.com/package/react-native-modal) it's way more simpler and it has a property onBackdropPress just for this case
PS: it even has some animations which makes it look way better than the normal modal
| null | CC BY-SA 4.0 | null | 2023-03-04T19:17:09.773 | 2023-03-04T19:17:09.773 | null | null | 13,174,364 | null |
75,638,097 | 1 | null | null | 0 | 19 | I have three components one is the main one and other two are tabs, problem is that matSort is not working, here is my code. have tried few hours searching on several sources but could not make it, any help would be appreciatable.
```
@Component({
selector: 'app-approve-home',
templateUrl: './approve-home.... | why ngAfterViewInit is not called while sorting the the table in multi tabs | CC BY-SA 4.0 | null | 2023-03-04T19:14:52.523 | 2023-03-05T05:10:25.700 | null | null | 12,836,822 | [
"javascript",
"html",
"angular",
"typescript",
"frontend"
] |
75,638,098 | 1 | null | null | 0 | 19 | I am following a react tutorial on Youtube and got stuck on the useEffect function in the index.js/Home file.
This is the link to the youtube video:[https://www.youtube.com/watch?v=bmpI252DmiI&ab_channel=freeCodeCamp.org](https://www.youtube.com/watch?v=bmpI252DmiI&ab_channel=freeCodeCamp.org)
I am stuck around the 30 ... | React Not Rendering Due to useEffect, infinite rendering loop? Text hover animation problem | CC BY-SA 4.0 | null | 2023-03-04T19:14:57.897 | 2023-03-04T19:18:41.630 | null | null | 19,435,690 | [
"javascript",
"reactjs",
"react-native",
"react-hooks",
"sass"
] |
75,638,103 | 1 | null | null | 0 | 35 | i found out you can "match" over the type of a generic like so:
```
use std::any::Any;
trait SomeTrait {}
struct SomeStruct<T: SomeTrait> {
atr: T,
}
struct Bar {
name: String,
}
impl SomeTrait for Bar {}
struct Baz;
impl SomeTrait for Baz {}
fn foo<T: SomeTrait + 'static>(s: SomeStruct<T>) {
let any: Box... | rust: match on generics | CC BY-SA 4.0 | null | 2023-03-04T19:15:33.277 | 2023-03-04T19:15:33.277 | null | null | 17,303,382 | [
"generics",
"rust",
"macros"
] |
75,638,109 | 1 | null | null | 0 | 4 | How can I change the language WPGlobus thinks it is in the middle of a function?
```
while( have_rows( 'countries', 'option' ) ) {
the_row();
$value = get_sub_field( 'value' );
$label = get_sub_field( 'label' ));
}
```
In this case it always returns the label in the current language the site is using. B... | How can I change the WPGlobus language mid function? | CC BY-SA 4.0 | null | 2023-03-04T19:17:07.480 | 2023-03-04T19:17:07.480 | null | null | 2,802,112 | [
"wordpress"
] |
75,638,108 | 2 | null | 75,638,045 | 1 | null | You can use nested loops to iterate through all the combinations and call your function for each combo. Then yo can store the results in the dataframe and append the values of FastMA and slowMA to it also.
```
import pandas as pd
import numpy as np
tkrs = ['spy']
results = pd.DataFrame(columns=['FastMA', 'SlowMA', 'M... | null | CC BY-SA 4.0 | null | 2023-03-04T19:17:05.900 | 2023-03-04T19:17:05.900 | null | null | 16,867,873 | null |
75,638,106 | 1 | 75,638,165 | null | 1 | 9 | I have a type guard function for type `User`. How do I extract the type, that this function "guards"? Using `ReturnType<typeof isUser>` obviously does not work since the return type of the function is `boolean`, not `User`.
```
type User = {
username: string
}
function isUser(value: unknown): value is User {
retur... | Typescript get type, that type guard function checks | CC BY-SA 4.0 | null | 2023-03-04T19:16:31.110 | 2023-03-04T19:27:08.410 | null | null | 10,632,556 | [
"typescript",
"generics",
"types",
"typeguards"
] |
75,638,117 | 2 | null | 75,637,173 | 3 | null | ESP8266 has no MMU capable of virtual memory, so it's not possible to run dynamic linker on it, so it's not possible to run valgrind ESP8266.
| null | CC BY-SA 4.0 | null | 2023-03-04T19:18:29.173 | 2023-03-04T19:18:29.173 | null | null | 9,072,753 | null |
75,638,111 | 1 | null | null | 2 | 47 | I'm going to write a hobby C++ app where the interface has lots of places with number inputs/outputs. Some of the values are based on other values. When editing a value, I want to recompute any value that depends on that value. Imagine something like the Blender 3D editor, where updating a value might update a bunch of... | Updating dependent values recursively | CC BY-SA 4.0 | null | 2023-03-04T19:17:28.687 | 2023-03-05T00:31:55.557 | null | null | 1,229,966 | [
"c++"
] |
75,638,119 | 2 | null | 75,638,098 | 0 | null | Return a cleanup function that actually clears the timeout:
```
useEffect(() => {
const timeout = setTimeout(() => {
setLetterClass('text-animate-hover')
}, 4000);
return () => clearTimeout(timeout);
},[]);
```
| null | CC BY-SA 4.0 | null | 2023-03-04T19:18:41.630 | 2023-03-04T19:18:41.630 | null | null | 10,379,728 | null |
75,638,115 | 2 | null | 75,606,882 | 0 | null | I used `np.sum(arr, axis=0)` and got the result:
```
array([[ 3. , 3. , 15. , 21. , 15. ],
[ 3. , 3. , 15. , 21. , 21. ],
[ 0.61666667, 0.61666667, 3. , 1.08333333, 9. ],
[ 0.43452381, 0.43452381, 9. ... | null | CC BY-SA 4.0 | null | 2023-03-04T19:18:05.463 | 2023-03-04T19:18:05.463 | null | null | 14,665,536 | null |