All Questions
20,854,516
questions
0
votes
0answers
2 views
Django filter ManyToMany with Q and Or
class State(models.Model):
name = models.CharField(max_length=55, unique=True)
class City(models.Model):
name = models.CharField(max_length=255)
states = models.ManyToManyField(State, ...
0
votes
0answers
3 views
Python suds: Getitng SSL: CERTIFICATE_VERIFY_FAILED error
I'm trying to request some data from a website using suds in Python. I'm getting urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get ...
0
votes
0answers
2 views
Inherit Companion Obejct in Children - Kotlin
I've read that static methods cannot overridden in Kotlin, so I'm not sure if this is possible, but not being able to do so would result in a lot of repetitious code. Is there any way to achieve the ...
0
votes
0answers
3 views
Count the Number of Items in a Woocommerce Order by Category
I'm really stuck on this and I'd really appreciate any help with this.
The goal is to count the number of items in each category on a Woocommerce order so that each section can be headed by the ...
0
votes
0answers
4 views
Significance of 'Timing stopped at:' in R studio
I was trying to run a code completely in R studio, and it was taking time. After 10 hours I interrupted and it is showing Timing stopped at: 1.43 0.69 1.644e+04 ,
What is the meaning of this line? how ...
0
votes
0answers
5 views
Split a string into columns of a table Python
I have a file containing many strings, all of the same format. These strings consist of numbers, all of which are used for providing information about a given problem. I am using Pandas to store my ...
0
votes
0answers
3 views
Is there anything particular you have to do to make a constructor function?
So to start this off; I'm a beginner in VisualBasic.Net and my classes require me to learn it. The current subject is object constructors and constructor methods. The current exercise (it's not graded ...
0
votes
0answers
3 views
Why headless chromes crashes
Today I wrote a python script to simply predict a number using regression.
Whenever I try to run the script on my centOS or Ubunto server the script crashes after a few minutes.
from selenium import ...
0
votes
0answers
2 views
Clipping Smartphone Gyroscope Readings (radians / second)
I'm using gyroscope recordings of Android Smartphones. The measurements are in radians / second. I recognized that sometimes there are some outliers and also the range is different between smartphones....
0
votes
0answers
3 views
Build a react project in django
I am embedding a react project inside my django app. I am serving the index.html file created by npm run build from django as opposed to just using django as a third party api. I like this approach as ...
0
votes
0answers
2 views
how do I add a triangle to the top right corner?
I want to add a triangle on the top right corner of the child items, but how can I achieve the following CSS element? I did the following table in order to build a matrix, but I want to add the ...
0
votes
0answers
3 views
How to update PyQt progressbar from an independent function with arguments?
I want to use multiple imported function with arguments that takes some while to run. I want a 'working' progress bar that track the processes of that function. I have followed 2 questions already ...
0
votes
0answers
6 views
Mock alert as side effect of a function with Jest
I'm trying to learn testing in general and Jest in particular.
I'm going through strange cases just to have an idea of how to handle them.
I have this super basic example. A function that takes a ...
0
votes
0answers
2 views
Flutter webrtc audio not working on android
In Flutter, I wish to do voice call between two peers. I'm using Flutter-WebRTC. I was doing some testing and video seems to be working with webrtc, but there is no audio.
I see the video of the ...
0
votes
0answers
4 views
How is FreeType calculating advance?
I am trying to figure out how the FreeType Library is calculating the FT_GlyphSlotRec_'s advance variable. According to the comment blocks above this structure, this variable would be the same as the ...
0
votes
0answers
4 views
Where to add context to Sentry-php?
As explained on Sentry Docs I'm trying to add some context to my PHP Aplication:
https://docs.sentry.io/platforms/php/enriching-events/context/
I have placed the configureScope in the exception, but ...
0
votes
0answers
1 view
Configure Nginx with Github Webhooks and secret
I have been looking for a way to configure my Nginx to listen to POST requests of webhooks from Github.
I configured a new Webhook in Github as follows:
Payload URL: https://myUrl/payload Secret: ...
0
votes
0answers
2 views
High SpriteKit draw count with SKSpriteNode & texture atlas
I have a SpriteKit game in which there are balls that bounce around. Despite using a texture atlas (a .spriteatlas folder located in my .xcassets folder), I'm getting 2 draw calls for each ball.
Some ...
0
votes
1answer
7 views
Expand column in dataframe based on subvalues (opposite of group by?)
Let’s say I have a dataframe. I want to take the values in col1 (A for example) and return multiple more values like A.1, A.2, A.3 etc.
Each of the values in this column correspond to groups of data ...
0
votes
0answers
5 views
Change “[Remove]” link text to an icon for coupon in WooCommerce checkout
I would like to change the "[Remove]" link text to an icon for coupons in WooCommerce checkout page.
Instead of "[Remove]" I would like it to be a trash can icon from Font Awesome.
...
0
votes
0answers
4 views
For statement inside if statement?
My code
if [[ -n $int ]]; then
for dev in /sys/class/net/*; do
if [ -e "$dev"/wireless ]; then
iwdev=${dev##*/};
break;
fi
done
else
iwdev=$int
fi
When int is ...
0
votes
0answers
2 views
Type Orm(NodeJs) APIs getting stuck after regular intervals
I am using NodeJs with TypeOrm with mssql in my project. I have almost completed my whole project with Angular JS. It was working very smoothly but after I merged my database with another database, my ...
0
votes
0answers
7 views
searching data using sql query
I have a simple sql query where I am trying to allow my employees to have the ability to search for other employees in my db. I want them to be able to search by both, or either first/last name. I ...
0
votes
0answers
3 views
Convert IPv4 into Hexadecimal in postgresql using Function/Procedure
I am writing a postgresql function/procedure to convert IPv4 column from a table into Hexadecimal for another table.
Function to convert IPv4 to Hex :-
CREATE OR REPLACE FUNCTION IPTOHEX(ip in varchar)...
0
votes
0answers
4 views
PermissionError: [Errno 13] when using tkinter for an image
Hello I am trying to make a python script that takes an image file from a computer and turn it into text. At the moment, I have the following code
from tkinter import Tk
from tkinter.filedialog import ...
0
votes
0answers
3 views
list of arrays into array of objects
I have a problem that I can't solve. Here is the thing. As a result of iteration, for each item I get one array with one object inside. I would like it to be one array that has all object items inside....
0
votes
0answers
3 views
Why does Outlook consistently remove the <Meta> tag containing charset info when attaching as a file to another email?
I've been working on an Outlook project that requires me to frequently look at the 'Source' information of emails. This shows the HTML as well as the contents of the email. When doing this, I ...
0
votes
0answers
4 views
Is there a way to set the largest subset as the base in statsmodels glm, and how do you get hold of the base from the params?
I have two questions on statsmodels GLM:
Is there a way to tell the glm to automatically set the level with most observations as the base (i.e. parameter 0) for each factor? If not, is there a reason ...
0
votes
0answers
3 views
helm chart template: if value does not exist, defaults to true
I am trying to declare that a block of code in a helm template should be present if a variable is true OR does not exist (ie, the default of the var is true). The following works:
{{- if or ....
0
votes
0answers
6 views
Update optionmenu dynamically tkinter
I am trying to read .xlsx worksheets using tkinter. But code is posting error of "TypeError: 'NoneType' object is not subscribable". I have made enough trial on it but not able to understand ...
0
votes
0answers
6 views
R error message for unused argument (writexl)
I have simple code
library(writexl)
write_xlsx(dataset, "C:/adhoc/my_data.xlsx")
The above works, however when I try
library(writexl)
write_xlsx(dataset, "C:/adhoc/my_data.xlsx", ...
0
votes
0answers
7 views
Using Laravel how do I display the value of my variable ( key ) in a html page?
my Route is :
Route::get('/dash/{$slug}', 'DashController@client');
I am currently using the below in a Controller:
public function client($slug)
{
$idz = Company::where('CompanyID', $...
0
votes
0answers
8 views
How to add gene names to TOMplot function in WGCNA?
I would like to add the genes names (preferable in the color of the cluster they correspond to) to the plot that is produced by the TOMplot() function of the WGCNA package. Very simple, like in a ...
0
votes
0answers
10 views
Where is Trash directory on Ubuntu 20.04?
I launched an EC2 instance in AWS and by mistake I deleted a directory that contained some configuration files for some services.
I searched the routes:
~.local/share
/root/.local/share
/usr /.local /...
0
votes
0answers
7 views
Cannot connect to MySQL in Python program
I am trying to establish a connection with a MySQL database in a python program
import mysql.connector
cnx = mysql.connector.connect(
host='localhost',
user='admin',
password='admin1234',
...
0
votes
0answers
15 views
Access data object properties inside an object
So I have the following piece of code:
const Menus = wp.api.models.Post.extend({
url: wpApiSettings.root + 'fh/v1/menus/' + path,
});
const menus = new Menus();
console.log(menus);
menus outputs ...
0
votes
0answers
9 views
Why does cat use lseek to check if a file is empty?
GNU cat detects attempts to write to the same file it’s reading from, raising an error if so:
$ echo data >file.txt
$ cat file.txt >>file.txt
cat: file.txt: input file is output file
This ...
0
votes
0answers
6 views
Splitting a row depending of known variable stored in an other database
I'm in SAS so the code is not pure MySQL.
I have a table like this
ID Fruits
1 Apple-Water-melon
2 Pine-Apple-Kiwi
But also another one with every different fruits
ID Fruits
x ...
0
votes
1answer
18 views
create an empty object based on pattern of another object
I have an object like this:
const Media = {
references: { analyze: [432, 5], translate: ["string", false] },
extensions: { analyze: ["something"], translate: ["...
0
votes
0answers
11 views
BindException: Address already in use (bind failed)
I am trying to create a socket that acts as either a client or a server depending on what it connects to/connects to it. What I have now is that it trys to connect as a client but if that fails it ...
0
votes
0answers
8 views
Show number of displayed products in woocommerce
I have a filter from Woo Product Filter, and I want to display the number of displayed products on the page, that also recounts before and after filtering on the page, as a function to functions.php
...
0
votes
0answers
8 views
Child theme css isn't updating on website
I have this child theme and when I put CSS in there it doesn't change. Also, I have this CSS plugin I have to use but I use the word !important with everything and I know it isn't great practice. Is ...
0
votes
0answers
9 views
background image not showing but other styles are showing for the same class or element
why is the background image not showing but if I change other properties like color or even background color it works? The image path is correct.
It is like this
.container {
...
0
votes
0answers
7 views
Django is rendering template from the database efficient
This is not a HOWTO question, as it, as such, has been answered before here
I am trying to integrate Django with modern frontend framework, and I found that it is possible to store and render Django ...
1
vote
0answers
8 views
How to incorporate spark scala map field to BQ?
I am writing a spark scala code to write the output to BQ, The following are the codes used for forming the output table which has two columns (id and keywords)
val df1 = Seq("tamil", "...
0
votes
0answers
9 views
How to change content of numpy array when indexing with a list?
could anyone explain me the reson why indexing the array using a list and using [x:x] lead to a very different result when manipulating numpy arrays?
Example:
a = np.array([[1,2,3,4],[3,4,5,5],[4,5,6,...
-1
votes
0answers
5 views
Is there any School Locator Plugin for WordPress?
I want to build a website, where user can search schools using ZIP Code, School name or district. Is there any WordPress plugin for that? Here is an example https://www.greatschools.org/
Please give ...
0
votes
0answers
12 views
Android View Binding onClickListener not being called
I'm updating an app and I read that the recommended way to handle Views now is to use View Binding. I followed the instructions, however I'm having some problems:
Adding a click listener with the ...
0
votes
0answers
10 views
Using go/ast for iota declarations
I've been working with go/ast to parse go source code and copy it into another file as part of a vendoring exercise. I've got most things handled - functions, types etc - but I'm struggling with const ...
0
votes
0answers
11 views
Prefixes using array in java
I'm coding a method that takes as input an array of integers and returns another array of strings, each of which denotes a non-empty prefix of the input array. For example, if the input
array is:
<...

