instruction stringlengths 0 30k ⌀ |
|---|
i've created a custom theme, and this is my function:
```
function add_main_nav() {
if( !is_nav_menu( 'scp-main-menu' )){
register_nav_menu('scp-main-menu',__( 'Main Menu' ));
$menu_id = wp_create_nav_menu( 'scp-main-menu' );
wp_update_nav_menu_item( $menu_id, 0, array(
... |
Is there any way to make OCR work on smaller fonts? (except font teaching) |
|python| |
null |
I have a website on WooCommerce built with Elementor. What I would like to happen on the single product page is for the "add to cart" button to change its label to "pre-order" only when certain sizes (variants) are selected. It's a shoe website, and I would like a user, when selecting, for example, size 38, for the but... |
How can I change the label 'add to cart' to 'pre-order' when a product variant (size) is selected? |
|woocommerce|addition|cart|elementor|product-variations| |
null |
i am using sox for creating synth with 100ms, this is my command:
```
/usr/bin/sox -V -r 44100 -n -b 64 -c 1 file.wav synth 0.1 sine 200 vol -2.0dB
```
now when i create 3 sine wave files and i combine all with
```
/usr/bin/sox file1.wav file2.wav file3.wav final.wav
```
then i get gaps between the files.... |
I am trying to simulate a web site access via C# code. The flow is
1) HTTP Get the the login Page. This succeeds.
2) HTTP Post to login page. This returns status 302, I disabled auto redirect in HttpClientHandler. Validated the cookie returned, it has the login cookie.
3) HTTP Get the actual content page. Returns s... |
HttpClient / RestSharp, unable to retrieve complete web content |
|web|httpclient|restsharp| |
null |
I've been trying to make an autocompleting textbox,but got the Access Violation error with the app closing(after being stuck a second beforehand)
This is my code:
```
private async void DashBoard_Load(object sender, EventArgs e)
{
textBox1.AutoCompleteSource = AutoCompleteSource.None;
... |
AutoComplete Textbox stops app and gives Acces Violation error |
|c#|firebase|winforms| |
Second menu overrides first why? |
|themes| |
null |
I had the same issue, with both windows curl and mingw(git) both where version 8.4.0
I downloaded curl 8.6.0 from here https://curl.se/windows/ and it soved the issue |
|android|firebase|android-intent| |
null |
null |
Earlier when I used to use command `$DebugPreference="Continue"` within the powershell script, this used to print the output with all the debugging lines. Now I am not able to see debug results in the test pane. And this is required to check where exactlty the powershell code failing and to know the exact error.
```... |
null |
I'm not 100% sure I understand what exactly you are looking for but here is a suggestion for splitting your data based on `Marital_Status` and performing an ANCOVA for each subgroup:
library(tidyverse)
# Creating a sample dataset
n <- 100 # number of observations
set.seed(0) # seed for repro... |
According to [Google Calculator][1] `(-13) % 64` is `51`.
According to JavaScript, it is `-13`.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
console.log(-13 % 64);
<!-- end snippet -->
How do I fix this?
[1]: http://www.google.com/search?q=-13... |
I had the same error, which I solved by following these steps:
1. Download the latest version of protobuf: `pip install --upgrade proctobuf`
Now you will get another error similar to this:
[![enter image description here][1]][1]
This is because the steps given by [these installation steps](https://tensorflow... |
I have a react native app with an android native java module that accesses my local Google Fit healthstore using the Java Google Fit API:
DataReadRequest readRequest = new DataReadRequest.Builder()
.enableServerQueries()
.aggregate(DataType.AGGREGATE_STEP_COUNT_DELTA)
... |
I'm currently developing my first project, a simple paint application using Java Swing and AWT. While implementing the painting functionality, I encountered an issue with accurately capturing mouse movements, especially when moving the mouse quickly.
I've designed the application to update the drawing coordinates in... |
Indeed, because of your window without a partition column, all data is brought to one partition. I think you can convert your query from a window operation to a groupby operation (and then cross-join the result back for example), which may solve your problem. |
Why do I get a ValidationError from my Kubernetes configuration file, even though it's valid YAML checked with a linter? |
I am trying to simulate a web site access via C# code. The flow is
1) HTTP Get the the login Page. This succeeds.
2) HTTP Post to login page. This returns status 302, I disabled auto redirect in HttpClientHandler. Validated the cookie returned, it has the login cookie.
3) HTTP Get the actual content page. Returns s... |
Add a JsonConverterAttribute to the CurrentLocation property
public class ObjectOfInterest
{
[JsonPropertyName("Name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("CurrentLocation")]
[JsonConverter(typeof(LocationConverter))]
public ... |
`SameSite=None` has specific requirements on security. Specifically, your server URL must be served over `https://` and the cookie must be marked as `Secure`.
For development environments where both client and server operate on the same hostname (ie `localhost`), you can use "Lax" which is also the default value.
... |
I couldn't have i+1 value for the last value of the RangeSet, therefore I want to ignore it in the constraint. However, I couldn't do that because i value always comes as default value. So, it does not enter to if statement. How can I solve the problem ?
import pyomo.environ as pyo
from pyomo.opt import Sol... |
Why always come default value from RangeSet to the constraint in Pyomo? |
|python|pyomo|nonlinear-optimization| |
when i run my backend file using nodemon app.js =>This Error Occurs
```
Error: querySrv ENOTFOUND _mongodb._tcp.cluster0.brbkwbs.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:275:17) {
errno: undefined,
code: 'ENOTFOUND',
syscall: 'querySrv',
hostname: '_mongodb._t... |
Unable to connect ot Mongodb? |
|node.js|mongodb|mongoose| |
null |
I am creating a method, which can send out emails with ics/calendar entry attached to it.
If I test the code by really sending out an email, it works with no problem, but if I try to get the Attachment in the Test with the nDumbster package, it does not get any attachments. I a now confused, if it should be in the A... |
I am trying to deploy a website with a php form on AWS. Each time I go to submit the form I get an error 500. It it is showing the instance is running. I also checked the logs and did not see anything wrong with it.
```
<?php
$name = $_POST["name"];
$email = $_POST["email"];
$message = $_POST["message"];
req... |
Erorr 500 when submitting form after AWS Elastic Beanstalk deployment |
|php|amazon-web-services|amazon-elastic-beanstalk|phpmailer| |
null |
The Accounts package does not support providing DKIM keys to node mailer - but - the package uses a common function (**Accounts.generateOptionsForEmail**) to create the object to be mailed, so it is possible to wedge the package to provide this functionality.
import { Accounts } from 'meteor/accounts-base'
... |
I enabled only 3.5 chat model. So, I need to pass it to LLM
chat = ChatSparkLLM(
spark_api_url="wss://spark-api.xf-yun.com/v3.5/chat",
spark_app_id="****", spark_api_key="***", spark_api_secret="**"
)
Then it worked fine, Thanks |
I like piping to a simple awk script for this. That way, you can customize with whatever colors/patterns suit you. You want to colorize an output unique to your project? Go for it.
Simply save this awk script to `./bin/colorize` in your project, `chmod 755 ./bin/colorize`, and customize to your needs:
```awk
#!/... |
In case you cannot (or not not want to) move the hal function's source code into the library, extend the library in a way it can consume a [pointer to a function][1] (either during some initialization step, or directly as a parameter of the hal function). This way, the code for the hal function will stay in the app, an... |
I am trying to simulate a web site access via C# code. The flow is
1) HTTP Get the the login Page. This succeeds.
2) HTTP Post to login page. This returns status 302, I disabled auto redirect in HttpClientHandler. Validated the cookie returned, it has the login cookie.
3) HTTP Get the actual content page. Returns s... |
I've been trying to learn some assembly and was testing out arrays and found that when I tried to print out the value at the point indexed nothing happened, after experimenting further it appears that even though I am using the arrays as shown in many examples across the internet, it just simply isn't working
Here's... |
Problems with getting Attachments with NDumbster |
|c#|.net|icalendar| |
null |
This can be done by the following:
1. Create a dimension table for your currency conversions
[![enter image description here][1]][1]
2. Create a relationship with your fact table like so connecting Currency - Currency
[![enter image description here][2]][2]
3. Lastly you can create a measure to calculate ... |
I try to migrate rails server that running directly on EC2 instance to EKS pod.
The server runs with unicorn_rails that has 20+ worker, also it has nginx as frontend that receive requests and communicate with unicorn_rails via unix domain socket.
When it run directly on EC2 isntance and ALB with target group of t... |
I'm trying to connect my MySql RDS instance to my Heroku environment securely, but I can't whitelist my ENV's ip address because (as I understand it) Heroku changes the ip address' at random.
Connecting them with an ip of 0.0.0.0 in the security group works, but isn't a best practice security wise. What alternative... |
Securely connect my Mysql RDS instance to my Heroku env |
|amazon-web-services|authentication|security|heroku|amazon-rds| |
null |
How can I pull the banner, id, etc. of the logged in user? next@12 next-auth@4.24.6
When I log the profile part at the bottom, all the information comes out, but when I try to do it in the frontend part, I can't pull it in a way I don't understand. I just started next.js. I couldn't use next-auth with next.js version ... |
{"Voters":[{"Id":4712734,"DisplayName":"DuncG"},{"Id":573032,"DisplayName":"Roman C"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[11]} |
SELECT * FROM db_hr.employee
WHERE salary > (
SELECT AVG(salary)
FROM db_hr.employee
)
GROUP BY salary;
What wrong with the query? it give me an error :
Error Code: 1055. Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db_hr.employee.id' which is not functionall... |
Error Code: 1055. Expression #1 of SELECT list is not in GROUP BY clause |
|sql|mysql|database|mysql-workbench|sql-query-store| |
null |
I am trying to simulate a web site access via C# code. The flow is
1) HTTP Get the the login Page. This succeeds.
2) HTTP Post to login page. This returns status 302, I disabled auto redirect in HttpClientHandler. Validated the cookie returned, it has the login cookie.
3) HTTP Get the actual content page. Returns s... |
The arrows can be disabled if the mininum and maximum dates fall within the current month and [prevent-min-max-navigation](https://vue3datepicker.com/props/calendar-configuration/#prevent-min-max-navigation) prop is used.
```html
<VueDatePicker
v-model="date"
:min-date="minDate"
:max-date="maxDate"
prev... |
I'd be tempted to avoid a wrapper class unless necessary. Seems like you could have it be a lot simpler with just a boolean
class Foo:
def __init__(self, bar):
self._bar = bar
self._mutable = False
@property
def bar(self):
return self._bar
... |
I've got a horizontal range of numbers in cells, and a vertical range of numbers in some other cells. I want a product of those ranges. For example cells A1:D1 contain 1,2,3,4 and cells A2:A5 contain values 5, 6,7,8. I except to get an answer of 70.
I run =SUMPRODUCT(A1:D1, A2:A5) and it gives me #VALUE. Same proble... |
The main problem with your current button behavior is caused by overlapping elements.
Currently, the svg icons are reducing the "hit-box" as they are overlapping the desired drop zone. You can apply CSS property `pointer-events:none` to let pointer events pass through these top elements and trigger the invisible `... |
I'd be tempted to avoid a wrapper class unless necessary. Seems like you could have it be a lot simpler with just a boolean
class Foo:
def __init__(self, bar):
self._bar = bar
self._mutable = False
@property
def bar(self):
return self._bar
... |
For the following script
```
#!/usr/bin/env bash
more <<_EOF_
PLEASE READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED TEXT. PLEASE READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED TEXT. PLEASE READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED TEXT. PLEASE READ THE TERMS OF THIS AGREEMENT AND ANY PROVI... |
get data of the user logged in to discord with next-auth |
|javascript|next.js| |
null |
Little late to answer, but want to help anyone else trying to figure out how to do this. This is basically a reducer to combine all of your state variables so you can update them with a single dispatch call. You can choose to update a a single attribute, or all of them at the same time.
```jsx
type State = {
las... |
You can do this, and I have managed to do it successfully. But it takes some effort. Here are some things I would suggest keeping in mind.
1) Figure out the Image format that you are extracting from. If you do a binwalk on `bzImage`, you'll see compressed images at various locations. Also shameless plug for https://... |
My data is instrument reads and instrument baselines. The baseline data is punctual and typically does not extend to the "ends" of the dataset (i.e. first and last rows). Therefore i want to make a function that looks at the baseline column, and copies the values of the earliest and latest baselinepoints to the very f... |
I need to get from my Pytorch AutoEncoder the importance it gives to each input variable. I am working with a tabular data set, no images.
My AutoEncoder is as follows:
class AE(torch.nn.Module):
def __init__(self, input_size, hidden_layer, latent_layer):
super().__init__()
... |
I have a problem.
When scrolling the page by 124 pixels, my Navigation Bar becomes sticky and is fixed on top of the screen.
```
const [scroll, setScroll] = useState(false);
useEffect(() => {
window.addEventListener("scroll", () => {
setScroll(window.scrollY > 124);
});
}, []);
retur... |
How to automatically answer "more" command |
|bash| |
My app will crash in release mode, it works find in debug mode. I suspect something should be kept in Proguard, but can't figure out what's wrong.
> Fatal Exception: java.lang.NullPointerException
> androidx.compose.ui.text.platform.AndroidParagraphHelper_androidKt.createCharSequence
> (AndroidParagraphHelper_andr... |
The problem with scrolling and fixing the nav bar at a certain X |
|javascript|html|css|reactjs| |
null |
You will want to:
1. Create the BufferedImage first and *outside* of any painting method. The painting method should be lean and fast, and not hold code that might be expensive with regards to time or memory, since slowing it down unnecessarily has a great effect on the perceived responsiveness of your code.
2. Draw ... |
|httpclient|restsharp| |
I'm currently working on a Dockerized web application using Docker Compose. I have two services defined in my docker-compose.yml file: db and api, where db is a PostgreSQL container and api is a Rails application. However, I'm encountering an error when trying to connect to the PostgreSQL server from my Rails applicati... |
Query
- group by `$user_id` to have only distinct users
- take the `$first` value of the duplicate values for the other fields
*you can add sort or match stage based on your needs
[Playmongo](https://squery.org/playmongo/?q=62867823853f039c69b0f8e7)
```js
aggregate(
[{"$group":
{"_id": "$user_id",
... |
I have a large 2d list that has duplicates in some sublist. I would like to return 2 or more duplicates and return the duplicates first if impossible. For instance,
Df =[[2,3,5,20],[5,10,20,10],[4,13,15,15,17,34,17],[33,34,15,21][12,16,24,32,12,33,24]]
I would like my result like this or
Df2 = [[15,17... |
Proguard for Android Jetpack compose UI |
|android|proguard|jetpack|compose| |
I'm trying to create a Homebrew formula for a Python project.
Here's the Homebrew formula:
```ruby
class Scanman < Formula
include Language::Python::Virtualenv
desc "Using LLMs to interact with man pages"
url "https://github.com/nikhilkmr300/scanman/archive/refs/tags/1.0.1.tar.gz"
sha256 "93658e020... |
I followed, below langchain documentation
**Reference** - https://python.langchain.com/docs/integrations/text_embedding/sparkllm
**Error Details**:
Request error: 11202, {'header': {'code': 11202, 'message': 'licc failed', 'sid': 'ase000fd997@dx18e35059f4c738d882'}}
|
iFlyTek, Spark Embeddings Error Code - 11202 |
|python|langchain|embedding| |