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,637,232 | 2 | null | 75,637,210 | 1 | null | `a("d","e")` will call `__init__` and return the new instance of the class `a`. Regular methods do not have this behavior.
The `b` method does not return anything (so it implicitly returns `None`); if you want to be able to chain that method, add `return self` at the end.
| null | CC BY-SA 4.0 | null | 2023-03-04T17:04:29.067 | 2023-03-04T17:04:29.067 | null | null | 9,513,184 | null |
75,637,233 | 2 | null | 6,117,023 | 0 | null | 11 years later but if is still usefull for anybody there, sometimes this happend if you have more than one project of mvc open, i dont know why but that usually happened to me, just close the projects that are not in use and try again, if this still does not work, just try to reset visual studio or your computer
| null | CC BY-SA 4.0 | null | 2023-03-04T17:04:31.370 | 2023-03-04T17:04:31.370 | null | null | 18,155,086 | null |
75,637,209 | 2 | null | 75,576,119 | -1 | null | After reading more on this topic, I think I should make this question more clear for later readers. The answer to the question in the title is: .
Atomic operations (the list is given in the question) just means that if a variable is being written by one thread, other threads would either see the old value or the update... | null | CC BY-SA 4.0 | null | 2023-03-04T17:00:53.137 | 2023-03-04T17:00:53.137 | null | null | 2,294,234 | null |
75,637,239 | 2 | null | 75,616,357 | 0 | null | This is not possible you cannot use new version of SonarQube with an old JDK version.
> Java used to run SonarScanner - Java 8 in SonarQube 8.9, Java 11 in SonarQube 9.0 and higher
So if you cannot upgrade your JDK to JDK11 you have to downgrade your SonarQube to 8.9 There is no way to make it work with SonarQube 9.x... | null | CC BY-SA 4.0 | null | 2023-03-04T17:05:57.803 | 2023-03-04T17:05:57.803 | null | null | 13,488,990 | null |
75,637,236 | 1 | null | null | 0 | 12 | This code is working:
```
WebDriver driver = new ChromeDriver();
driver.get("https://www.ebay.com/sch/ebayadvsearch");
driver.findElement(By.cssSelector("#_nkw")).sendKeys("guitar");
Thread.sleep(2000);
```
And this code is not:
```
Select sc = new Select(driver.findElement(By.cssSelector("#s0-1-17-4[0]-7[3]-_sacat"))... | Selenium SendKeys works only on one textbox in the page | CC BY-SA 4.0 | null | 2023-03-04T17:05:29.307 | 2023-03-04T23:17:38.340 | 2023-03-04T23:17:38.340 | 6,083,675 | 3,804,781 | [
"java",
"selenium-webdriver",
"css-selectors"
] |
75,637,238 | 2 | null | 75,637,005 | 1 | null | The Unix-like systems that come with Vim by default do so only because they "need" a `ex` command and a `vi` command for [POSIX](https://en.wikipedia.org/wiki/POSIX) compatibility and Vim, a well maintained, modern, and pretty faithful `vi` clone, happens to have a relative permissive licence that makes it easy to incl... | null | CC BY-SA 4.0 | null | 2023-03-04T17:05:50.183 | 2023-03-04T17:05:50.183 | null | null | 546,861 | null |
75,637,234 | 1 | null | null | 1 | 20 | I have this scenario:
I have a parent component that has a child , and a dynamic number of s.
```
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
name = 'Angular ' + VERSION.major;
ids = ['a1', 'b1', 'c1', 'd1', 'g1']... | How do I get values from dynamic number of child components based on another child component action in Angular? | CC BY-SA 4.0 | null | 2023-03-04T17:04:43.187 | 2023-03-04T17:04:43.187 | null | null | 7,537,454 | [
"angular",
"typescript"
] |
75,637,241 | 2 | null | 75,633,766 | -2 | null | ```
Please go through the below example. Here's an easy way to achieve this
Map countMap =
products.stream()
.collect(Collectors.groupingBy(n ->
getTypeName(n.getTypeId()), Collectors.counting()));
}
private static String getTypeName(Integer p) {
return typeListMap.get(p).getName();
}
``... | null | CC BY-SA 4.0 | null | 2023-03-04T17:06:00.110 | 2023-03-05T04:14:05.223 | 2023-03-05T04:14:05.223 | 19,421,233 | 19,421,233 | null |
75,637,224 | 1 | 75,637,845 | null | 0 | 19 | I have a large dataframe of crime incidents, , with four columns. Here INCIDENT_DATE is datatype datetime. There are three possible types as well (Violent, Property, and non-index).
| ID | Crime | INCIDENT_DATE | Type |
| -- | ----- | ------------- | ---- |
| XL123445 | Aggrevated Assault | 2018-12-29 | Violent |
|... | How To Create New Pandas Columns With Monthly Counts From DateTime | CC BY-SA 4.0 | null | 2023-03-04T17:03:02.593 | 2023-03-04T18:40:21.677 | 2023-03-04T17:20:01.260 | 18,095,308 | 18,095,308 | [
"python",
"pandas",
"dataframe",
"datetime",
"count"
] |
75,637,242 | 2 | null | 48,759,051 | 0 | null | There is not 'ACTION' tab to click. There is a 'Reset to Default Layout', but that did not reset to the ECS wizard that I need in the old UI.
I need the older version because I am doing a AWS Challenge Lab at my school, and the steps require input on the ECS wizard, which does not exist in the new UI experience.
| null | CC BY-SA 4.0 | null | 2023-03-04T17:06:00.300 | 2023-03-04T17:06:00.300 | null | null | 21,332,606 | null |
75,637,245 | 2 | null | 71,941,750 | 0 | null | You need to ensure the Framework CLI along with Node.JS is installed on your computer. So first install [Node.JS](https://nodejs.org/en/) and then open NPM command prompt and type `npm install -g framework7-cli`, this will install Framework7 CLI and then type `framework7 create` that probably should work.
| null | CC BY-SA 4.0 | null | 2023-03-04T17:06:40.680 | 2023-03-04T17:06:40.680 | null | null | 576,050 | null |
75,637,247 | 1 | null | null | 1 | 36 | Longtime OOP developer here spinning up on R and R6. I'm used to having namespaces to hold the classes (e.g., Geom::Point, Vital::BloodPressure). I haven't found a way to do that in R. I'm not building a package but I'm not against it if that is the solution.
| How can I namespace R6 classes in the R Language? | CC BY-SA 4.0 | null | 2023-03-04T17:07:06.337 | 2023-03-04T20:27:13.133 | null | null | 1,188,730 | [
"r",
"r6"
] |
75,637,243 | 2 | null | 75,636,626 | 1 | null | I would harness GNU `AWK` for this task following way, let `file.txt` content be
```
3SN0P00000026941
14N0P00000026677
6SN0P00000024671
3SN0P00000018643
```
then
```
awk '{two=/^[0-9][0-9]/;print (two?"ENS":"EN") substr($0,two?3:2) " " substr($0,1,two?2:1)}' file.txt
```
gives output
```
ENSN0P00000026941 3
ENSN0P000... | null | CC BY-SA 4.0 | null | 2023-03-04T17:06:16.333 | 2023-03-04T17:06:16.333 | null | null | 10,785,975 | null |
75,637,240 | 2 | null | 75,637,156 | 1 | null | You can use [value_counts](https://pandas.pydata.org/docs/reference/api/pandas.Series.value_counts.html) and [groupby](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.groupby.html)
```
groupby_cols = ["org", "product_version", "release_date"]
g = df.groupby(groupby_cols)
out = pd.concat(
[
g[c... | null | CC BY-SA 4.0 | null | 2023-03-04T17:05:59.563 | 2023-03-05T00:18:51.097 | 2023-03-05T00:18:51.097 | 1,410,303 | 1,410,303 | null |
75,637,246 | 1 | null | null | -1 | 38 | SQL DB2/400
Trying to add leading zero, align right.
```
` NUMERIC REQUIRED_OUTPUT
.0000 0.0000
1.0000 1.0000
.0000 0.0000
100.0000 100.0000
`
```
Part way there...
```
SELECT NBUN62 as NUMERIC ,char(NBUN62)... | SQL DB2 - add leading zero, align right | CC BY-SA 4.0 | null | 2023-03-04T17:06:57.353 | 2023-03-04T17:52:07.653 | 2023-03-04T17:46:57.063 | 2,142,028 | 2,972,041 | [
"sql",
"database",
"db2",
"ibm-midrange"
] |
75,637,249 | 1 | null | null | 1 | 14 | I was experiencing a problem with new tailwindcss utility modules not hot reloading but only for my /pages file and not my /components or /layout files. Classes used when I initial ran `npm run dev` would load correctly but if I changed a class to something not previously used it wouldn't load (ie: `bg-red-400` to `bg-... | New TailwindCSS utility classes not hot reloading /pages directory in NuxtJS 3 (Vue) | CC BY-SA 4.0 | null | 2023-03-04T17:07:35.473 | 2023-03-04T17:07:35.473 | null | null | 18,325,443 | [
"javascript",
"css",
"vue.js",
"nuxt.js",
"tailwind-css"
] |
75,637,252 | 1 | null | null | 1 | 19 | I'm trying to print the results as a form of aX^2+bX+c and I don't want the variables to be printed if it's value is non important(starts with _) or =1 or -1
```
polynomial_string(A, B, C, PolyString) :-
% Generate polynomial coefficients
rA(A, Sg2, Coef2, Var2, Expo2),
rB(B, A, Sg1, Coef1, Var1),
rC(C,... | Format ignore non important underscore variables | CC BY-SA 4.0 | null | 2023-03-04T17:08:01.837 | 2023-03-04T17:08:01.837 | null | null | 15,204,140 | [
"prolog",
"swi-prolog"
] |
75,637,250 | 2 | null | 75,637,249 | 0 | null | I am not sure why this worked but removing the style tags from _app.vue fixed it. Even if the style tag included the tailwindcss imports, the hot reload wouldn't work. I included the css in my nuxt.config.ts
nuxt.config.ts:
```
import { defineNuxtConfig } from "nuxt/config";
export default defineNuxtConfig({
build: ... | null | CC BY-SA 4.0 | null | 2023-03-04T17:07:35.473 | 2023-03-04T17:07:35.473 | null | null | 18,325,443 | null |
75,637,253 | 1 | null | null | 1 | 27 | I'm currently building a SAN into my file server currently. In order to log in to set everything up it downloads a JNPL file. I understand to open this you need Java's `javaws.exe` program normally installed by default. But When I download the java versions that should have it, the .exe isn't there.
To specify the SAN ... | Javaws.exe missing from JRE 5.0 | CC BY-SA 4.0 | null | 2023-03-04T17:08:05.443 | 2023-03-04T17:15:19.057 | 2023-03-04T17:15:19.057 | 18,164,229 | 18,164,229 | [
"java",
"server"
] |
75,637,254 | 1 | null | null | 0 | 12 | I'd like to display an image fullwidth on my webpage and scroll the image based on click coordinates.
For example on the page of the left if I click where the red circle is, page is expected to scroll as shown on right :
[](https://i.stack.imgur.com/fwnig.png)
I did a previous implementation by segmenting original ima... | Scroll webpage based on click coordinates on an image | CC BY-SA 4.0 | null | 2023-03-04T17:08:14.723 | 2023-03-04T17:18:28.533 | null | null | 5,181 | [
"javascript",
"scroll",
"html5-canvas"
] |
75,637,255 | 2 | null | 58,656,498 | 0 | null | Have you tried removing all height properties off the body tag? I had this issue and I removed
I would experiment by removing any
Also make sure you clear your cache.
| null | CC BY-SA 4.0 | null | 2023-03-04T17:08:25.177 | 2023-03-04T17:14:01.407 | 2023-03-04T17:14:01.407 | 4,276,084 | 4,276,084 | null |
75,637,257 | 1 | null | null | -1 | 11 | Code trials:
```
voucher_input = WebDriverWait(driver, 10).until(EC.presence_of_element_located ((By.NAME, "voucher")))
```
I tried changing the name for input field in code still didn't fix it
| How to input some text into input field using Selenium Python? | CC BY-SA 4.0 | null | 2023-03-04T17:08:45.990 | 2023-03-04T18:27:58.177 | 2023-03-04T18:27:58.177 | 7,429,447 | 21,332,587 | [
"python",
"selenium-webdriver",
"xpath",
"css-selectors",
"webdriverwait"
] |
75,637,204 | 1 | null | null | 0 | 8 | I created a simple Springboot project based on 2.7.9.
```
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.9'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'com.example.profiler'
version = '1.0.0-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
... | Springboot build bootimage with google stackdriver fails | CC BY-SA 4.0 | null | 2023-03-04T16:59:12.107 | 2023-03-04T16:59:12.107 | null | null | 1,160,185 | [
"spring-boot",
"build",
"stackdriver",
"buildpack"
] |
75,637,259 | 2 | null | 75,637,210 | 0 | null | To be even more explicit about how to fix this:
```
c = a()
c.b("d", "e")
print(c.ka, c.sif)
```
Now we're not depending on `b` to return anything (which it doesn't).
| null | CC BY-SA 4.0 | null | 2023-03-04T17:09:11.083 | 2023-03-04T17:09:11.083 | null | null | 14,122 | null |
75,637,251 | 2 | null | 75,635,024 | 0 | null | Concurrency problems are caused when two processes are trying to use the same [DbContext] resource at the same time. Blazor is inherently asynchronous, so the chances of concurrency problems are pretty high. The problem is solved by using a DbContext Factory and contexts.
However, that's not so easy with the UserMan... | null | CC BY-SA 4.0 | null | 2023-03-04T17:07:38.173 | 2023-03-04T17:16:21.430 | 2023-03-04T17:16:21.430 | 13,065,781 | 13,065,781 | null |
75,637,256 | 1 | null | null | 0 | 4 | How to save an Excel file into a file_stream (IOBytes).
Here is the code:
```
import io
from django.core.files.base import File
import datetime
import pandas as pd
def planSaveFile(request, pk):
plan = get_object_or_404(Plan, pk=pk)
file_name = 'foo.xlsx'
# creation of an Excel file saved in memory
w... | How to go from pandas.ExcelWriter to models.FileField | CC BY-SA 4.0 | null | 2023-03-04T17:08:33.527 | 2023-03-04T17:49:04.040 | 2023-03-04T17:49:04.040 | 17,106,153 | 17,106,153 | [
"django-models",
"io",
"filefield",
"pandas.excelwriter"
] |
75,637,261 | 1 | null | null | 0 | 6 | I want to get Sparse weight matrix in Convolution layer.
As you know, Convolution kernel is interative to get the output matrix.
In this case, I want to look this calculation as one matrix multiplication.
For doing this, I have to make Sparse Matrix.
I know this is very inefficient in memory.
However, I need it.
Can an... | CNN`s weight matrix | CC BY-SA 4.0 | null | 2023-03-04T17:09:36.247 | 2023-03-04T17:09:36.247 | null | null | 14,900,720 | [
"python",
"conv-neural-network"
] |
75,637,258 | 1 | null | null | 0 | 27 | I have data like
```
user_id status name
11111 active John
11111 rejected Jai
22222 active Prince
33333 rejected King
```
I want output as
```
user_id active_name rejected_name
11111 John Jai
22222 Prince null
33333 null King
```
i.e. aggregate on user_... | Get error when using CASE statement with GROUP BY in Hive | CC BY-SA 4.0 | null | 2023-03-04T17:09:10.697 | 2023-03-04T17:21:00.743 | null | null | 4,493,212 | [
"sql",
"group-by",
"apache-spark-sql",
"hive"
] |
75,637,229 | 1 | null | null | -1 | 23 | So I'm pretty new to React and useState. Basically I have two useState arrays that hold questions and answers from a child component's text box. For example, when the text changes inside the child component "question" text box, it will update the questions useState array in the parent component, which it does correctly... | React useState not returning the correct value when called from a button onClick | CC BY-SA 4.0 | null | 2023-03-04T17:03:16.720 | 2023-03-04T17:03:16.720 | null | null | 21,332,538 | [
"javascript",
"reactjs",
"react-hooks",
"jsx"
] |
75,637,266 | 1 | null | null | -1 | 13 | I want to discuss few accessibility defects which found while testing the website.
1). Tab focus does not reach on the input text field hence input text field is inactive.
2). when user click on 'show here' link, a table gets loaded in the same page but screen reader remains silent
3) a table have each row has 'show he... | Accessibility defect resolution | CC BY-SA 4.0 | null | 2023-03-04T17:10:28.810 | 2023-03-04T17:10:28.810 | null | null | 21,281,713 | [
"wcag",
"defects"
] |
75,637,265 | 1 | null | null | 0 | 5 | I have monitor with touchscreen, touchscreen on windows working good but when I run ubuntu 18.04 touchscreen didnt work, on the back of my monitor there is Model NO: R19L340 from monitor there are 2 cables, DVI and USB
xinput list output:
```
Virutal core pointer id=2 [master pointer (3)]
Virtual co... | Touchscreen using PL2303 not working on Ubuntu | CC BY-SA 4.0 | null | 2023-03-04T17:10:22.013 | 2023-03-04T17:10:22.013 | null | null | 21,105,687 | [
"ubuntu",
"touchscreen"
] |
75,637,269 | 1 | null | null | 0 | 5 | I'm writing a flash card program for Japanese vocabulary that uses multiple fonts. I have the files in the assets directory but I'd like to move them to external memory. Since these aren't typical media files how do I access them using the storage access framework? I know how to access individual files but I want to ... | How would I use Android storage access framework for ttf font files | CC BY-SA 4.0 | null | 2023-03-04T17:10:38.703 | 2023-03-04T17:10:38.703 | null | null | 2,631,304 | [
"android"
] |
75,637,270 | 1 | null | null | -1 | 9 | When we play a video in YouTube, in video seekbar you would have seen different many chapters in timeframe and a graph above the seekbar as I have attached a screenshot below.
How I have got a video.mp4 file so how can I add this feature in that video seekbar using JavaScript or jQuery.
Can anyone share..
[](https://i.... | How to add each timeframe chapters and graph in seekbar of a video. Its is the feature in youtube when we play any video. Using Javascript or Jquery | CC BY-SA 4.0 | null | 2023-03-04T17:10:39.567 | 2023-03-04T17:10:39.567 | null | null | 8,010,473 | [
"javascript",
"jquery",
"video",
"seekbar"
] |
75,637,260 | 1 | null | null | 0 | 4 | I am trying to compile a large project with gulp and webpack, however whenever I rename a file (`foo.js` -> `foo.ts`) it errors with an odd message:
```
[11:17:16] Error: File not found with singular glob: C:/Dev Temp/ts/my-repo/gulp/\Dev Temp\ts\my-repo\build\bundle.js (if this was purposeful, use `allowEmpty` option)... | Webpack Errors While Trying to Follow Duplicated Bundle Path On File Rename | CC BY-SA 4.0 | null | 2023-03-04T17:09:20.113 | 2023-03-04T17:09:20.113 | null | null | 12,795,161 | [
"webpack"
] |
75,637,267 | 2 | null | 75,637,184 | 0 | null | Fairly simply, as you have the list of genres in the same object:
```
const all = Object.fromEntries(
props.genres.map(genre =>
[
genre,
props.movies.map(
movie => movie.genres.filter(filmGenre => filmGenre === genre).length
).reduce((total, count) => total + count, 0)
]
... | null | CC BY-SA 4.0 | null | 2023-03-04T17:10:32.900 | 2023-03-04T17:16:11.227 | 2023-03-04T17:16:11.227 | 671,543 | 671,543 | null |
75,637,272 | 1 | null | null | -2 | 13 | I'm having issue fetching multiple users at once the only thing mongodb suggests is the $lookup method but i'm unable to get the users
[The method i tried using to solve the issue](https://i.stack.imgur.com/RMpl4.png)
| fetching multiple users from friends array | CC BY-SA 4.0 | null | 2023-03-04T17:10:54.147 | 2023-03-04T17:10:54.147 | null | null | 19,302,415 | [
"javascript",
"database",
"mongodb",
"express",
"mongoose"
] |
75,637,268 | 2 | null | 75,637,189 | 1 | null | That's because you have `async` code in your `initState`, when you create the Widget, the `initState` is executed but it's async, so while that async method is executing your Widget is displayed.
After you `checkTheme` finished, the value is updated but you are not rebuilding the widget.
The easy fix is adding a setSta... | null | CC BY-SA 4.0 | null | 2023-03-04T17:10:34.993 | 2023-03-04T17:26:20.353 | 2023-03-04T17:26:20.353 | 666,221 | 666,221 | null |
75,637,264 | 1 | 75,637,584 | null | 0 | 22 | I'm trying to execute this script [https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh](https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh) in a Dockerfile.
```
# I have already downloaded the file
RUN bash Miniconda3-py38_23.1.0-1-Linux-x86_64.sh
```
When I launch it... | Run shell script in non interactive mode in Dockerfile | CC BY-SA 4.0 | null | 2023-03-04T17:10:18.543 | 2023-03-04T18:00:42.147 | null | null | 6,824,121 | [
"bash",
"docker"
] |
75,637,275 | 1 | null | null | 0 | 14 | From angular service class, I am calling the api and getting response as
[The response](https://i.stack.imgur.com/MeU2b.png)
And I need to display [frontend](https://i.stack.imgur.com/s34mz.png)
I have tried using iteration and inserting into new object but it is not working
| How to display the key value in angular from JSON response | CC BY-SA 4.0 | null | 2023-03-04T17:11:30.933 | 2023-03-04T17:11:30.933 | null | null | 21,332,600 | [
"javascript",
"json",
"angular8"
] |
75,637,273 | 2 | null | 50,686,907 | 0 | null | >
if you are using Kotlin add this plugin to the app build.gradle level:
```
plugins {
...
id "androidx.navigation.safeargs.kotlin"
}
```
and in the build.gradle project level add this plugin:
```
plugins {
...
id 'com.google.dagger.hilt.android' version '2.42' apply false
}
```
if you a... | null | CC BY-SA 4.0 | null | 2023-03-04T17:11:10.467 | 2023-03-04T17:11:10.467 | null | null | 16,528,861 | null |
75,637,279 | 2 | null | 41,394,494 | 0 | null | This works :
```
var regex = /^(0|(\+33[\s]?([0]?|[(0)]{3}?)))[1-9]([-. ]?[0-9]{2}){4}$/;
```
Explanation is available [here](https://regexr.com/79hsg)
| null | CC BY-SA 4.0 | null | 2023-03-04T17:11:56.900 | 2023-03-04T17:11:56.900 | null | null | 18,427,893 | null |
75,637,276 | 1 | null | null | -1 | 37 | ```
#include <iostream>
using namespace std;
// Complement of Base 10 Integer
int main()
{
int n, mask = 0, ans;
cout << "enter a number : ";
cin >> n;
if (n == 0)
{
cout << 1;
}
else
{
while (n != 0)
{
mask = (mask << 1) | 1;
n = n >> 1... | Why output is coming out to be different ? [Bitwise Manipulation] | CC BY-SA 4.0 | null | 2023-03-04T17:11:39.877 | 2023-03-04T17:14:50.610 | null | null | 20,984,803 | [
"c++",
"bit-manipulation"
] |
75,637,277 | 1 | null | null | -4 | 21 | suppose a condition i'm sending the n files from Vm1 to vm2 using rsync command every minutes
and in vm2 files are processed by every 15 minutes by running the python code but the problem is that at the 15 mins some files have rached the vm2 and at that moment python code processing start at the vm2 but some files on ... | some files are missed by another vm2 when it processing the file | CC BY-SA 4.0 | null | 2023-03-04T17:11:40.050 | 2023-03-04T18:01:36.023 | 2023-03-04T18:01:36.023 | 21,332,579 | 21,332,579 | [
"python",
"linux",
"rsync"
] |
75,637,263 | 1 | null | null | 0 | 19 | I was trying to use the Material3Switch but it behaves weirdly when i use the style.
The switch becomes completely purble when it is unchecked even tho i don't have any purple color defined in my theme or elsewhere.[](https://i.stack.imgur.com/d78N4.jpg)
[](https://i.stack.imgur.com/8Ragi.jpg)
My switch:
```
<com.goog... | MaterialSwitch becomes completely purple when unchecked | CC BY-SA 4.0 | null | 2023-03-04T17:09:53.100 | 2023-03-04T17:09:53.100 | null | null | 11,881,850 | [
"android",
"xml",
"kotlin",
"material-design"
] |
75,637,280 | 1 | 75,637,331 | null | 0 | 50 | My problem is:
Write a function
def remove_minimum(values)
that returns the list resulting from removing the minimum value from a given list without using the min() function nor the pop() function.
Do not print the list.
I have a code that sorts and reverses the list but I cannot figure out how to remove the minimum wi... | Remove Minimum number from a list without min() or pop() | CC BY-SA 4.0 | null | 2023-03-04T17:12:09.407 | 2023-03-04T17:54:03.450 | 2023-03-04T17:25:14.783 | 10,760,768 | 21,323,277 | [
"python",
"computer-science"
] |
75,637,282 | 2 | null | 12,862,601 | 0 | null | Years later…
```
const formElements = Object.entries($('form').get(0).elements)
.reduce((arr, [_, el]) =>
el.name
? Object.assign(arr, { [el.name]: el.value })
: arr,
{}
);
```
The result is a simple key:value list of all form elements with a non-empty name.
For vani... | null | CC BY-SA 4.0 | null | 2023-03-04T17:12:21.903 | 2023-03-04T17:12:21.903 | null | null | 1,449,366 | null |
75,637,281 | 1 | null | null | 0 | 9 | So i'm trying to print a table, where the header is fixed, and the rows containing of packet information is constantly added, instead of re-printing the same table with new packets.
```
import pyshark
import sys
import os
from prettytable import PrettyTable
cap = pyshark.LiveRingCapture(interface='eth0')
cap.sniff_con... | PYTHON/PYSHARK I need to output a table that prints new rows without re-printing itself with new rows | CC BY-SA 4.0 | null | 2023-03-04T17:12:21.417 | 2023-03-04T17:14:40.830 | 2023-03-04T17:14:40.830 | 21,332,298 | 21,332,298 | [
"python",
"pyshark"
] |
75,637,278 | 1 | null | null | 2 | 20 | I'm trying to understand why my parallelized numba function is acting the way it does. In particular, why it is so sensitive to how arrays are being used.
I have the following function:
```
@njit(parallel=True)
def f(n):
g = lambda i,j: zeros(3) + sqrt(i*j)
x = zeros((n,3))
for i in prange(n):
for j... | Why do small changes have dramatic effects on the runtime of my numba parallel function? | CC BY-SA 4.0 | null | 2023-03-04T17:11:44.443 | 2023-03-04T21:11:05.207 | 2023-03-04T17:39:17.267 | 12,939,557 | 8,667,071 | [
"python",
"performance",
"numba"
] |
75,637,274 | 1 | null | null | 0 | 37 | I am trying to write a generic reusable API call that takes an argument of a type that conforms to the Codable protocol. I then intend to decode the retrieved JSON as a struct which contains this generic argument type. I have named this struct NetworkResponse. My issue is that an error is raised when attempting to d... | Swift Generic & Reusable API call, how to decode a struct that contains a generic type? | CC BY-SA 4.0 | null | 2023-03-04T17:11:18.380 | 2023-03-04T18:34:51.947 | 2023-03-04T18:34:51.947 | 19,898,801 | 19,898,801 | [
"swift",
"generics",
"struct",
"request",
"codable"
] |
75,637,283 | 1 | null | null | 0 | 11 | I'm trying to add my GeoJSON file so that I can display the locations (as circles for now), and I have validated this file on geojson.io as well as geojsonlint.com. Here's the current code:
```
map.on("load", function () {
map.addSource("my-data", {
type: "geojson",
data: "../carparks.... | Mapbox GL JS Unable to read local GeoJSON file | CC BY-SA 4.0 | null | 2023-03-04T17:12:28.400 | 2023-03-04T17:14:09.777 | 2023-03-04T17:14:09.777 | 21,332,566 | 21,332,566 | [
"javascript",
"mapbox"
] |
75,637,271 | 2 | null | 75,636,666 | 1 | null | If I understand correctly, you are trying to apply styles to the most recently clicked button. In that case, you can use radio buttons. They are displayed in the following snippet for demonstration purposes; to hide them, use CSS `display: none;` or other tricks.
Inside the `addNewButton` function your (`buttonClick`),... | null | CC BY-SA 4.0 | null | 2023-03-04T17:10:50.050 | 2023-03-04T20:02:34.360 | 2023-03-04T20:02:34.360 | 21,305,238 | 21,305,238 | null |
75,637,288 | 1 | null | null | 0 | 19 | I would the google sheets formula to search for specific words in the same cell, and when it gets a match it will return those words/values
For example, a cell (K3) contains the following characters: FR, IT, ES, GB, DE, AT, CH, BZ, BQ, CM, CF, CN, AF, AL, AS, BS, BD, BJ, BM, BT, VG ,BI, KH, KY, CK, CU, HT, HN
In F3, I... | Google Sheets - IF cell contains certain a list of text then text values return values | CC BY-SA 4.0 | null | 2023-03-04T17:13:01.280 | 2023-03-04T18:01:39.033 | null | null | 21,265,169 | [
"google-sheets",
"search"
] |
75,637,286 | 1 | null | null | 0 | 9 | `
```
def highlight_text(self, pdf_file, room_id):
for page in pdf_file:
### SEARCH
text = str(room_id)
print(text)
text_instances = page.search_for(text)
### HIGHLIGHT
for inst in text_instances:
highlight = page.add_highl... | How can I add an oval shape into the PDF surrouding the highlighted text? I have tried a rectangle | CC BY-SA 4.0 | null | 2023-03-04T17:12:49.130 | 2023-03-04T17:12:49.130 | null | null | 11,082,613 | [
"python",
"user-interface",
"tkinter"
] |
75,637,287 | 2 | null | 75,637,034 | 2 | null | I would consider creating a custom [theme](https://www.danieldsjoberg.com/gtsummary/articles/themes.html) with `gtsummary`. One of the theme elements is `ci.sep` which is the:
> string indicating separator between upper and lower bounds of
confidence intervals
The default is a comma, and could be set to endash or other... | null | CC BY-SA 4.0 | null | 2023-03-04T17:12:56.283 | 2023-03-04T17:12:56.283 | null | null | 3,460,670 | null |
75,637,284 | 1 | null | null | 0 | 21 | I'm building a Selenium application for automating some tasks. It runs infinitely and the site I'm using it on is very unstable, meaning I need to wrap everything in my own wait wrapper which checks for unexpected conditions. The site can randomly give errors or not advance from one page from another, so I solved it ki... | What is this concept in OOP called and how dangerous is it in Python? | CC BY-SA 4.0 | null | 2023-03-04T17:12:43.247 | 2023-03-04T20:37:26.990 | 2023-03-04T20:37:26.990 | 17,562,044 | 8,967,225 | [
"python",
"oop",
"selenium-webdriver"
] |
75,637,293 | 1 | null | null | 0 | 8 | Hi i have a doubt regarding the play console
Can all invited users check every apps uploaded by individual users in play console?
I have multiple users to invite to google play console to upload their individual apps, but the apps uploaded by a user should not be visible to others.
| Can all invited users check every apps uploaded by individual users in google play console? | CC BY-SA 4.0 | null | 2023-03-04T17:13:25.570 | 2023-03-04T17:13:25.570 | null | null | 8,813,997 | [
"android",
"google-cloud-platform",
"google-play",
"google-play-services",
"google-play-console"
] |
75,637,285 | 1 | null | null | 0 | 21 | I have write following code.
When it come to changing a value of dropdownbutton but seeing value of valueTo, it not changing.
The null on top of screen should change when valueTo change.
I also thought it only because text isn' t uploaded it to firebase but it was also null.
What should I modify to change the global va... | onChanged change value of dropdown but variable does not; flutter | CC BY-SA 4.0 | null | 2023-03-04T17:12:44.743 | 2023-03-04T17:12:44.743 | null | null | 19,464,995 | [
"flutter",
"firebase"
] |
75,637,296 | 2 | null | 75,635,298 | 0 | null | There might be a delay in the update. you might try setting up a timer to give enough time to update the useState.
```
function updateNotes() {
if (title === '' || detail === '') {
console.warn('Each input must have a value');
} else {
setId((prev) => prev + 1);
// Delay the state update by 10... | null | CC BY-SA 4.0 | null | 2023-03-04T17:13:57.983 | 2023-03-04T17:13:57.983 | null | null | 9,726,922 | null |
75,637,289 | 1 | null | null | 1 | 14 | I have two model namely Receipt and RentPayment. What I want to achieve is for me to create a Receipt, I want to redirect to a RentPayment form with a initial value of the recently saved receipt in the receipt field.
models.py
```
class Receipt(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uui... | TypeError at /accounts/add_rent_payment/1363902a-c341-4883-84ee-1e12156b0381 | CC BY-SA 4.0 | null | 2023-03-04T17:13:02.133 | 2023-03-04T19:14:06.243 | 2023-03-04T19:14:06.243 | 17,562,044 | 17,692,638 | [
"python",
"django",
"django-models",
"django-views",
"django-forms"
] |
75,637,295 | 1 | null | null | 1 | 7 | I want to use curve_fit in python with 8 independet parameters (a,b,c,d,e,f,g,h)
My raw data from the experiment ist:
[](https://i.stack.imgur.com/VU4xU.png)
The global function is the normal distribution.
Behind mu and sigma there is an individual model equation:
mu(a,b,c,d,oc1,oc2,oc3)= a * b^oc1 * c^oc2 * d^oc3
sigm... | How to execute curve_fit(func,x,y) with multiple input parameters in python? | CC BY-SA 4.0 | null | 2023-03-04T17:13:51.287 | 2023-03-04T17:13:51.287 | null | null | 17,822,924 | [
"python",
"curve-fitting",
"scipy-optimize"
] |
75,637,299 | 2 | null | 41,511,511 | 0 | null | Below one may be one of the reason, I was able to solve my error by doing that.
| null | CC BY-SA 4.0 | null | 2023-03-04T17:14:11.297 | 2023-03-04T17:14:11.297 | null | null | 14,876,640 | null |
75,637,291 | 1 | null | null | 0 | 15 | The "*" are my credentials to log in, and are set to variables.
When I run the code, my returned value is a string stating my conditional statement, else value.
I am pretty sure I am thinking in the right direction, but somewhere in my thought process its getting mixed up. I hope its a simple fix.
Also bare with me I ... | Problem getting my application to log into webpage | CC BY-SA 4.0 | null | 2023-03-04T17:13:22.770 | 2023-03-04T17:13:22.770 | null | null | 10,972,568 | [
"c#",
"web-scraping",
"console-application",
"html-agility-pack",
"httpclienthandler"
] |
75,637,300 | 1 | 75,637,702 | null | 0 | 23 | I want to read a numeric expression (ex:- 9/3) from the user during runtime and print the answer(3). I used readline() but since it reads the line as a string, when as.numeric() function is applied the output is NaN. How do I convert the expression to get a numeric value?
This is the code I used.
expression = readline(... | How to read a numeric expression from user in R studio | CC BY-SA 4.0 | null | 2023-03-04T17:14:21.013 | 2023-03-04T18:19:10.033 | 2023-03-04T17:25:25.717 | 13,998,717 | 13,998,717 | [
"r",
"user-input"
] |
75,637,290 | 1 | null | null | 0 | 8 | I have, to my knowledge, properly implemented the phong tessellation code, as presented in [http://www.klayge.org/material/4_0/PhongTess/PhongTessellation.pdf](http://www.klayge.org/material/4_0/PhongTess/PhongTessellation.pdf)
Despite that, when I use a shape factor of 1 on an icosphere from blender, I don't get any c... | Phong Tessellation doesn't curve object | CC BY-SA 4.0 | null | 2023-03-04T17:13:08.517 | 2023-03-04T20:46:55.000 | 2023-03-04T20:46:55.000 | 16,878,334 | 16,878,334 | [
"3d",
"hlsl",
"direct3d",
"direct3d11",
"tessellation"
] |
75,637,302 | 2 | null | 75,636,937 | 0 | null | It looks like your `main` clause is not in the scope of the module, but in the scope of the class definition. You might try un-indenting the `if __name__ == "__main__":` to the left margin (leave an indent for the code after that line).
| null | CC BY-SA 4.0 | null | 2023-03-04T17:14:40.787 | 2023-03-04T17:14:40.787 | null | null | 12,379,462 | null |
75,637,298 | 1 | null | null | 0 | 4 | I am trying to use moviepy in Python to edit some videos, however I can't get basic code to run. The moviepy library installs just fine, and I have ffmpeg installed.
I tried running the following example code from moviepy, just replacing the initial video file name with my own:
```
from moviepy import *
#CURRENT ISSUE... | Error 'VideoFileClip is not defined'...? (moviepy, Python 3.x) | CC BY-SA 4.0 | null | 2023-03-04T17:14:11.190 | 2023-03-04T17:18:08.290 | 2023-03-04T17:18:08.290 | 20,436,696 | 20,436,696 | [
"python-3.x",
"moviepy"
] |
75,637,301 | 1 | null | null | -1 | 10 | I have a little problem with my online store on WooCommerce. I have several product categories. Some of them contain dozens of items. The problem is that when adding a product to the cart, for example from page 6, it takes the customer back to page 1.
I don't know if this is WooCommerce issue or JS
| After adding a product to the cart, WooCommerce goes back to the first page | CC BY-SA 4.0 | null | 2023-03-04T17:14:22.613 | 2023-03-04T17:14:22.613 | null | null | 10,787,205 | [
"wordpress",
"woocommerce"
] |
75,637,305 | 2 | null | 27,932,345 | 0 | null | aws s3 cp s3:// --recursive(id pushing multiple file)
| null | CC BY-SA 4.0 | null | 2023-03-04T17:15:27.023 | 2023-03-04T17:15:27.023 | null | null | 7,425,780 | null |
75,637,227 | 1 | null | null | 0 | 13 | I am creating a QR code generator with tkinter in Python 3.10 that can generate QR codes that can be used for different things and save them in your local file system, it can also adjust the size of the QR codes.
The code is unfinished, but I have encountered a problem with a toplevel window. The error is that when i p... | Python Tkinter Error when creating a toplevel, messagebox pops up with Tk_GetPixmap: Error from CreateDIBSection, The operation completed successfully | CC BY-SA 4.0 | null | 2023-03-04T17:03:13.340 | 2023-03-04T18:37:18.373 | 2023-03-04T18:37:18.373 | 20,399,158 | 20,399,158 | [
"python",
"tkinter",
"crash",
"qr-code",
"tkmessagebox"
] |
75,637,294 | 1 | null | null | 0 | 12 | I am trying to run linear regression with gradient descent from scratch. I have a csv file for which I would like to run this linear regression. Here is the code:
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('/Users/eliasbrasildesouza/Downloads/archive (2)/prices.csv')
X ... | Tuple index out of range (linear regression) | CC BY-SA 4.0 | null | 2023-03-04T17:13:38.897 | 2023-03-04T17:18:32.670 | null | null | 21,328,668 | [
"python",
"machine-learning",
"linear-regression",
"gradient-descent"
] |
75,637,303 | 2 | null | 75,637,276 | 0 | null | The value of `n` is changed to `0` by the loop:
```
while (n != 0)
{
mask = (mask << 1) | 1;
n = n >> 1;
}
```
If you want to use the value of `n` later, save it elsewhere.
```
int n_original = n; // save the value of n
while (n != 0)
{
mask = (mask <... | null | CC BY-SA 4.0 | null | 2023-03-04T17:14:50.610 | 2023-03-04T17:14:50.610 | null | null | 4,062,354 | null |
75,637,312 | 2 | null | 74,366,986 | 0 | null | > Java used to run SonarScanner - Java 8 in SonarQube 8.9, Java 11 in SonarQube 9.0 and higher
Either upgrade your JDK to JDK11 or downgrade SonarQube to 8.9
| null | CC BY-SA 4.0 | null | 2023-03-04T17:16:46.030 | 2023-03-04T17:16:46.030 | null | null | 13,488,990 | null |
75,637,304 | 1 | null | null | -1 | 29 | I am trying to do this very trivial task, but I cannot find any complete instructions on how to do it.
So far, I gathered that
APK is just an archive that files can be added to using aapt add MyApp.apk file1 file2 ...
Or the files must be added to the assets folder
The APK must be less than 100mb to be allowed on the A... | Need step by step instructions how to automatically add files to the APK in Android Studio | CC BY-SA 4.0 | null | 2023-03-04T17:15:13.937 | 2023-03-04T17:38:05.863 | 2023-03-04T17:38:05.863 | 2,056,201 | 2,056,201 | [
"java",
"android",
"android-studio",
"apk"
] |
75,637,310 | 1 | null | null | 0 | 13 | [enter image description here](https://i.stack.imgur.com/NyBeH.png)
Shown above is my Dataframe image and I want to filter:
1. only columns which are ['lesbian', 'gay', 'bisexual', 'transgender', 'trans','queer', 'lgbt', 'lgbtq', 'homosexual', 'straight','heterosexual']
2. Filter rows where atleast one of the above co... | How to filter specific rows by using seuset of columns values in a pandas dataframe | CC BY-SA 4.0 | null | 2023-03-04T17:16:31.410 | 2023-03-04T18:30:01.553 | 2023-03-04T17:18:41.230 | 21,332,609 | 21,332,609 | [
"python-3.x",
"pandas",
"dataframe"
] |
75,637,309 | 1 | 75,637,601 | null | -1 | 38 | I'm working on a web page using VS Code.
I noticed that when I serve and open it using [the Live Server extension](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer), my background image loads correctly.
But when I open the index.html file through my operating system / desktop environment's nati... | Why does my file load correctly through Live Server, but not through my browsers' support for the file:// protocol? | CC BY-SA 4.0 | null | 2023-03-04T17:16:30.757 | 2023-03-04T21:42:04.653 | 2023-03-04T21:42:04.653 | 11,107,541 | 12,744,067 | [
"css",
"visual-studio-code",
"liveserver"
] |
75,637,314 | 1 | null | null | -3 | 23 | I want select all the numbers on python not choose a random number
how to do it
```
while True:
id = ['407474340', '1950713662', '7993793340', '1606183110', '534649695', '2540710248']
ran = ''.join(random.choice(id))
```
| How To Select all numbers on python | CC BY-SA 4.0 | null | 2023-03-04T17:17:24.227 | 2023-03-04T17:30:20.827 | 2023-03-04T17:30:20.827 | 21,332,599 | 21,332,599 | [
"python",
"random"
] |
75,637,307 | 1 | null | null | 0 | 14 | I have imported my first Maven REST Server project to Eclipse, that also exposes a simple file. Eclipse flags an error at the JSP file, allthough the server and the JSP base servlet works as expected.
```
The superclass "jakarta.servlet.http.HttpServlet", determined from the Dynamic Web Module facet version (5.0), was... | "jakarta.servlet.http.HttpServlet" not found | CC BY-SA 4.0 | null | 2023-03-04T17:15:45.760 | 2023-03-04T17:39:48.957 | 2023-03-04T17:30:07.130 | 1,793,217 | 1,793,217 | [
"eclipse",
"jsp"
] |
75,637,315 | 1 | null | null | 0 | 11 | I am following this [tutorial](https://blog.appsignal.com/2021/10/12/how-to-do-live-uploads-in-phoenix-liveview.html), in which Ms. DeBenedetto masterfully explains how to do file uploads in a liveview component. I pretty much followed all the instructions, but get strange behavior when selecting the image to be upload... | Elixir Phoenix Liveview Component Live Input File Deletes All Other Fields | CC BY-SA 4.0 | null | 2023-03-04T17:17:32.890 | 2023-03-04T18:11:12.867 | 2023-03-04T18:11:12.867 | 21,313,424 | 17,571,042 | [
"elixir",
"phoenix-framework",
"phoenix-live-view"
] |
75,637,313 | 1 | null | null | 0 | 7 | i'm calling an api in angular (the login and register work perfectly) but when i try to get some videos i get this error :
"Access to XMLHttpRequest at 'https://localhost:8081/videos/allVideos' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the... | how can i Access to XMLHttpRequest blocked in angular 13 with spring boot 3 | CC BY-SA 4.0 | null | 2023-03-04T17:17:01.007 | 2023-03-04T17:17:01.007 | null | null | 14,636,193 | [
"angular",
"spring",
"spring-boot",
"spring-mvc"
] |
75,637,319 | 2 | null | 66,860,480 | 0 | null | Had the same problem. I eventually tracked to down to the following line in a user control:
```
InitializeComponent();
Font font = new Font(new FontFamily("Tahoma"), 9.0F, FontStyle.Regular); // <-- Culprit
```
I fixed it by postponing the font initialization until after the control is loaded...
```
this.Load += dele... | null | CC BY-SA 4.0 | null | 2023-03-04T17:18:30.123 | 2023-03-04T17:18:30.123 | null | null | 9,717,257 | null |
75,637,318 | 2 | null | 75,637,254 | 0 | null | You don't paste code, so that we can only guess
You can use `hash` location method
```
<a href="#myid"></a>
<div id="myid"></div>
```
If you know element, use
```
element.scrollIntoView();
```
Otherwise, use `scrollTo` method
```
document.body.addEventListener("click", (event)=>{
scrollTo(event.pageX,event.pageY)... | null | CC BY-SA 4.0 | null | 2023-03-04T17:18:28.533 | 2023-03-04T17:18:28.533 | null | null | 19,502,363 | null |
75,637,311 | 1 | null | null | -1 | 46 | I am trying to create a program that identifies anagrams. Here is the prompt:
Two strings are anagrams if the letters can be rearranged to form each other. For example,
“Eleven plus two” is an anagram of “Twelve plus one”. Each string contains one ‘v’, three ‘e’s,
two ‘l’s, etc.
Write a program that determines if two s... | Is my code running in linear time? (O(n)) | CC BY-SA 4.0 | null | 2023-03-04T17:16:36.387 | 2023-03-04T17:34:26.343 | null | null | 21,332,634 | [
"c++",
"algorithm",
"function",
"pointers"
] |
75,637,308 | 1 | null | null | 0 | 16 | In the first code I would like to have a selectable button, which does work for now. By following this video [https://www.youtube.com/watch?v=NkcVTEAl8eY](https://www.youtube.com/watch?v=NkcVTEAl8eY). However I would like to be able to acces the information about the button being selected or not in another structure, i... | How to access to a variable in another structure with another view in SwiftUI? | CC BY-SA 4.0 | null | 2023-03-04T17:15:55.890 | 2023-03-04T17:16:39.003 | 2023-03-04T17:16:39.003 | 560,942 | 21,332,506 | [
"swiftui"
] |
75,637,325 | 2 | null | 75,637,184 | 1 | null | Here is a solution iterating over the movies only once (this solution works provided that a movie doesn't declare duplicate genre in its `genres` array)
```
const createInitValue = () => props.genres
.reduce((obj, genre) => ({...obj, [genre]: 0}), {});
const nbMoviesByGenre = props.movies
.flatMap(movie => movie.g... | null | CC BY-SA 4.0 | null | 2023-03-04T17:20:01.527 | 2023-03-04T17:27:31.313 | 2023-03-04T17:27:31.313 | 5,521,607 | 5,521,607 | null |
75,637,316 | 1 | null | null | 0 | 12 |
# Background/aims:
I'm trying to get my Raspberry Pi Pico Wh connected to my mesh wi-fi network for a star wars themed notification light project I'm working on. I'm only able to get it connected when I specify a BSSID of the access point I want it to connect to. What I'd ideally like is to be able to give it an arr... | Is it possible to pass hex BSSID value to the wlan.connect function? | CC BY-SA 4.0 | null | 2023-03-04T17:18:08.113 | 2023-03-04T17:18:08.113 | null | null | 21,332,486 | [
"python",
"wireless",
"micropython",
"raspberry-pi-pico",
"rp2040"
] |
75,637,323 | 1 | null | null | 1 | 16 | I have a convex objective function and a convex constraint of the form $y^2/x + z \leq 1$ on the domain $x \geq 0$. But I'm not sure how to encode this constraint in a way that cvxpy will accept it. It seems to be rejecting it because it can't convince itself that the constraint is convex.
Here is a simple example code... | CVXPY convex but getting DCP error for constraint y^2/x + z <= 1 | CC BY-SA 4.0 | null | 2023-03-04T17:19:08.307 | 2023-03-04T17:22:17.213 | 2023-03-04T17:22:17.213 | 21,332,622 | 21,332,622 | [
"cvxpy",
"convex-optimization"
] |
75,637,329 | 2 | null | 54,844,447 | 0 | null | The same issue here but within an Objective-C project within an NSViewController.
I could resolve it with this call:
```
- (void)viewDidAppear
{
[super viewDidAppear];
[self.view.window makeFirstResponder: self];
}
```
| null | CC BY-SA 4.0 | null | 2023-03-04T17:20:37.713 | 2023-03-04T17:20:37.713 | null | null | 4,263,207 | null |
75,637,321 | 1 | null | null | 0 | 8 | ```
from os import scandir, rename
from os.path import splitext, exists, join
from shutil import move
import time
import logging
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
source_dir=r'*censored*'
mp3_dir=r'*censored*'
# ? supported Audio types
audio_extensions = \["... | Error using python watchdog lib. AttributeError: 'nt.DirEntry' object has no attribute 'rstrip' | CC BY-SA 4.0 | null | 2023-03-04T17:18:55.437 | 2023-03-04T17:34:52.547 | null | null | 21,332,525 | [
"python",
"watchdog",
"python-watchdog"
] |
75,637,330 | 2 | null | 75,637,258 | 0 | null | You need aggregation functions for every column that is not in the GROUP BY
For you `MAX` is the right choice, but of course there many others for man occations
```
SELECT
user_id,
MAX(CASE WHEN status = 'active' THEN name ELSE NULL END) AS active_name,
MAX(CASE WHEN status = 'rejected' THEN name ELSE NULL ... | null | CC BY-SA 4.0 | null | 2023-03-04T17:20:41.677 | 2023-03-04T17:20:41.677 | null | null | 5,193,536 | null |
75,637,326 | 2 | null | 75,626,522 | 0 | null | Snippet:
```
import tkinter as tk
from tkinter import ttk
root = tk.Tk()
root.geometry("700x350")
style= ttk.Style()
style.theme_use('clam')
style.configure("TCombobox", fieldbackground= "red", background= "white")
cb= ttk.Combobox(root, width= 25, values=["Python", "Raspberry pii", "C++"])
cb.pack()
root.mainloop... | null | CC BY-SA 4.0 | null | 2023-03-04T17:20:05.457 | 2023-03-04T17:20:05.457 | null | null | 4,136,999 | null |
75,637,328 | 2 | null | 58,331,479 | 0 | null | In case one also needs to add custom converters to the default JsonSerializerOptions (System.Text.Json >= 7.0.0) - without the use of controllers - one can use the following trick:
```
var jsonConverterList = new List<JsonConverter>
{
new YourCustomConverter1(),
new YourCustomConverter2()
};
Type type = AppDom... | null | CC BY-SA 4.0 | null | 2023-03-04T17:20:22.743 | 2023-03-04T17:20:22.743 | null | null | 21,331,768 | null |
75,637,332 | 2 | null | 75,633,627 | 0 | null | You are currently trying to compare the entire object to a string which can confuse Unity. If you are trying to compare the name of the object with "RC_zombie1" then the best solution is to add a .name to the end of the col.gameObject which will return the name of the current object. But if you are attempting to compar... | null | CC BY-SA 4.0 | null | 2023-03-04T17:20:57.917 | 2023-03-04T17:20:57.917 | null | null | 12,245,147 | null |
75,637,334 | 1 | null | null | 0 | 7 | I want to add some datapoint in my existing Bar chart in a pptx file from Python.
[enter image description here](https://i.stack.imgur.com/Wy6Ho.png)
| How to add or update datapoint in a BAR plot in pptx using python? | CC BY-SA 4.0 | null | 2023-03-04T17:21:04.283 | 2023-03-04T17:21:34.657 | 2023-03-04T17:21:34.657 | 21,332,644 | 21,332,644 | [
"bar-chart",
"python-pptx"
] |
75,637,331 | 2 | null | 75,637,280 | 0 | null | For this type of question, you can use simple looping to search and compare to get it:
This allows you to achieve the result without using or or . IF you can use some of these it will be much simpler.
```
def remove_min(values):
# search the minimum value in the list, starting with the first num
min_val = v... | null | CC BY-SA 4.0 | null | 2023-03-04T17:20:45.737 | 2023-03-04T17:39:26.120 | 2023-03-04T17:39:26.120 | 10,760,768 | 10,760,768 | null |
75,637,335 | 1 | 75,637,391 | null | 1 | 25 | Im currently solving an algorithmic task with Python and I got this function, which I should finish:
```
def solution(nums: Union[List[int], Tuple[int, ...]]) -> int:
```
I don't understand what does those thing mean in function. What is `nums:`? What does `nums: Union[List[int], Tuple[int, ...]]` mean at all. Could y... | What do parameters in my specific function mean? | CC BY-SA 4.0 | null | 2023-03-04T17:21:05.073 | 2023-03-04T17:31:27.227 | null | null | 12,314,164 | [
"python",
"python-3.x",
"function",
"union"
] |
75,637,336 | 2 | null | 74,906,603 | 0 | null | I don't see your definition for ShowAlert, but presumably the reason co_await does not work for it is that ShowAlert does not have the correct asynchronous return definition (promise_type). The underlying ContentDialog in WinUI only has one way to invoke it, which is ShowAsync i.e. an asynchronous invocation.
ContentDi... | null | CC BY-SA 4.0 | null | 2023-03-04T17:21:08.547 | 2023-03-04T17:21:08.547 | null | null | 6,090,828 | null |
75,637,339 | 2 | null | 4,296,888 | 0 | null | If you can use records, you would still have to repeat the name of the properties, but the syntax would be lighter and you can add more properties in the derived classes.
```
public abstract record GrammarElement(TokenSegment Segment)
{
// common functions
}
public record Identifier(TokenSegment Segment, string Name... | null | CC BY-SA 4.0 | null | 2023-03-04T17:22:01.920 | 2023-03-04T17:22:01.920 | null | null | 4,772,735 | null |
75,637,324 | 2 | null | 75,529,312 | 0 | null | When you say "select" I am assuming you're referring to a dropdown menu, and that "basic combobox" refers to the textbox/dropdown combination that allows the user to select from a dropdown or enter in their own text.
You're right that not allowing users to deselect an answer on a non-mandatory question in a form is a U... | null | CC BY-SA 4.0 | null | 2023-03-04T17:19:46.210 | 2023-03-04T17:19:46.210 | null | null | 4,192,038 | null |
75,637,341 | 2 | null | 3,029,870 | 0 | null | You can also try like this by getting the whole elements inside the form from submit event
```
$('#formId').submit((e) => {
e.preventDefault()
var data = $(e.target).serializeArray();
Array.from(e.target.elements).filter((e) => e.type == 'checkbox').forEach((v) => {
if(!v.checked)
data.... | null | CC BY-SA 4.0 | null | 2023-03-04T17:22:10.663 | 2023-03-04T17:22:10.663 | null | null | 6,426,817 | null |
75,637,338 | 1 | null | null | 0 | 13 | I use that code from ChatGPT but it have error:
> ValueError: TypeError: object of type 'RaggedTensor' has no len()
```
import tensorflow as tf
# Create a 2D ragged tensor
rt = tf.ragged.constant([[1, 2, 3], [4, 5, 6], [7, 8], [9, 10, 11, 12], [13]*100])
# Find the row lengths
row_lengths = rt.row_lengths()
# Create ... | In 2D ragged tensor, how to remove rows have more than 50 element | CC BY-SA 4.0 | null | 2023-03-04T17:21:54.897 | 2023-03-04T20:38:33.573 | 2023-03-04T20:38:33.573 | 17,562,044 | 21,332,641 | [
"python",
"tensorflow"
] |