instruction stringlengths 0 30k β |
|---|
Redirect Users to another website using GAS |
|html|google-apps-script|redirect|url-shortener| |
In my Pine Script strategy function, I set the following parameters:
```pine
strategy("XXX", overlay=true,
initial_capital = 1000,
default_qty_value = 50,
default_qty_type = "percent_of_equity",
pyramiding = 4,
commission_type = "percent",
commission_val... |
TradingView alerts are not being executed by strategy() |
|pine-script|alert|tradingview-api| |
<s>Most likely the `int32_t * SIZE` in the `malloc` call. If you use a bit-shift like `SIZE << 2` instead, your code should be much faster and more efficient.</s>
OK, in all seriousness, `a_ptr`, `b_ptr`, and `c_ptr` are all separate blocks of memory. In your loop you are accessing one, then the other, then the othe... |
I wish to merge `df1` and `df2` to `df3` and keep order. my demo code add `sort=False` but it not work as expected.
```
import pandas as pd
data1 = [
['4A', 1],
['3B', 2],
['2C', 3],
['1D', 4],
]
data2 = [
['2C', 9],
['4A', 3],
['6F', 2],
['5G', 1],
]
df1 = pd.... |
I am trying to study the dynamics of a charged particle inside potential fields. I tried defining a dummy potential like this:
```
x = np.linspace(-20, 20, 10)
y = np.linspace(-20, 20, 10)
z = np.linspace(0, 10, 10)
X, Y, Z = np.meshgrid(x, y, z)
V = X**2 + Y**2 + Z**2
```
and I used gradient function to get... |
How to throw a charged particle in a electric vector field? |
You could use [`top_k`](https://docs.pola.rs/py-polars/html/reference/dataframe/api/polars.DataFrame.top_k.html) and slice the last row:
```
import polars as pl
np.random.seed(0)
df = pl.DataFrame({'col': np.random.choice(5, size=5, replace=False)})
out = df.top_k(2, by='col')[-1]
```
You could also [`filter... |
I have been asked in one of the Top company below question and I was not able to answer.
Just replied : I need to update myself on this topic
**Question :**
**If you create a composite indexing on 3 columns (eid , ename , esal ) ?**
- If i mention only eid=10 after where clause will the indexing be call... |
`make menuconfig` allows to tweak the Buildroot configuration, no the Linux kernel configuration. To tweak the Linux kernel configuration, run `make linux-menuconfig`, which will fire up the menuconfig of the Linux kernel.
See https://bootlin.com/doc/training/buildroot/buildroot-slides.pdf starting slide 76 for more... |
I have been asked in one of the Top company below question and I was not able to answer.
Just replied : I need to update myself on this topic
**Question :**
**If you create a composite indexing on 3 columns (eid , ename , esal ) ?**
- If i mention only eid=10 after where clause will the indexing be call... |
{"Voters":[{"Id":14732669,"DisplayName":"ray"},{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":839601,"DisplayName":"gnat"}]} |
Currently my project uses OpenCV to process pictures, draw some information and then push the video frames out through ffmpeg, because it is a live streaming form of pushing, the processing speed of a single frame is very high, the processing speed is slow, it will lead to push out the video stream dropped frames. Afte... |
null |
I'm not sure what the nday() stands for, but I guess you are doing a count down for button to be enable, if that case, try the code below:
```
setTimeout(() => {
localStorage.removeItem("color");
localStorage.removeItem("name");
done11.style.backgroundColor = "white";
done11.innerText = "Claim";... |
I am trying to learn the dataverse API using C#. I am following the code in this github: https://github.com/microsoft/PowerApps-Samples/blob/master/dataverse/orgsvc/C%23-NETCore/GetStarted/ConsoleApp%20(public)/Program.cs
I changed the login information and the appID to my app registration's client id and added a re... |
Connecting to Dataverse api in C# |
|c#|dataverse| |
Is there a way in vscode to after I type Ctrl + . and accept a correction with quick fix, to automatically run the key combo Alt+F8 to move to the next problem without having to?
I use a spelling extension and it to correct a word by selecting Ctrl+ . then selecting the correct suggestion. However after this selecti... |
In my research work, I want to do the vehicle survival fraction; survival rates were calculated using the log-logistic survival function. In equation two unknown parameters a, and b are obtained by minimising the sum of squared errors between the experimental and modelled. The equation of the model is:
S = [1 + (t/a)^... |
I have enabled Http2 in Azure portal in Application gateway configuration.
Also, I am accessing it using https and have min version set to TLS 1.2
Still, when accessing it from browser, Chrome dev tools report protocol http 1.1 is being used.
Am I missing something? |
Azure Application Gateway http/2 not working |
|azure|azure-application-gateway| |
|excel|vba|macos|excel-tables|listobject| |
You can also use 'non-null assertion operator' which is used if the typescript compiler complains about a value being null or undefined , you can use the ! operator to assert that the said value is not null or undefined .
*ngIf="cardForm.controls.name.errors!['required']" |
I dont really know how to code lua, i made a script, when "Numlock" is on the script clicks "a" for a random time duration, then releases "a" and it presses "s" for random time. repeats the script until numlock is turned off. it doesnt work tho..
> function OnEvent(event, arg)
OutputLogMessage("wawa")
if ev... |
LGHUB LUA script |
|lua|logitech|logitech-gaming-software| |
null |
I don't know if this helps, but I encountered something similar to this issue earlier this week. I couldn't figure out why my receipts weren't being cut by a USB POS printer consistently. Sometimes they would, sometimes they wouldn't. It dawned on me that my Golang program might be executing too quickly, clearing the b... |
|excel|vba|autofilter|excel-tables|listobject| |
Maybe it would be useful for you to import the images and not use the path.
<script setup>
import image1 from '../../assets/images/image1.png'
import image2 from '../../assets/images/image2.png'
const imageSource = computed(() => {
return isBlue.value ? image1 : image2
})
<... |
I'm using this solution by wOxxOm [here][1] to keep the service worker alive in my chrome extension (manifest v3).
I used the offscreen solution because I use win7 so I can only use chrome v109. it works very well, but when the PC hibernate then wake up, the service worker will restart with a probability of 50%. for... |
I am new to Flask and JavaScript, so help would be appreciated. I am making a mock draft simulator, and I have a function that contains a for loop, that simulates a selection for each team, adds the pick to a dictionary, and after the loop breaks, the dictionary is sent to JavaScript.
```
@app.route('/simulate-draft'... |
How can I update my Python app so my Flask function sends information to JavaScript without breaking the loop? |
|javascript|flask| |
null |
I am receiving the following error codes in my output. I am using Icarus Verilog, with VSCode as my IDE. Would anyone know how to resolve this?
**No top level modules, and no -s option.**
This issue has occurred in one other instance before and I was not sure how to proceed.
```
`timescale 1ns / 1ps
... |
I'm encountering an issue with Hibernate where I'm getting the following SQL error:
Please help me to resolve error
SQL Error: 0, SQLState: 42P01
ERROR: missing FROM-clause entry for table "th1_1"
Position: 14
I'm working on a Spring Boot application where I'm using Hibernate for ORM mapping. I have entities... |
How to Draw Chinese Characters on a Picture with OpenCV |
|python|opencv|python-imaging-library| |
null |
Suppose if we have two micro services communicating using spring Rest Template call and they are exchanging the request and response respectively.Now if I want to use the Kafka in between them to increase throughput. Is it possible to achieve this scenario?
I am able to publish the object as string and produce in Ka... |
I have written a Fortran subroutine to compute the size of an array and I want to get the result directly in R. However, I do not get the expected result...
First I build the `size95.f95 file`
```
subroutine fsize(x, n)
double precision, intent(in):: x(:)
integer, intent(out) :: n
n = size(x)
end subrout... |
How to get size of array directly from Fortran to R? |
|r|fortran| |
null |
[![enter image description here][1]][1]I want to implement a feature where when I click on a specific sentence within this paragraph, the background color of that sentence changes.
I've tried looking into gesture detection and text selection features within Jetpack Compose, but couldn't find a straightforward way to... |
Hmm this is not really a NextJS issue, but a [CORS issue][1]. Client side request get's blocked directly by the browser since https://api.example.com does not allow cross-origin requests. Your localhost being not the same origin as example.com.
One way to fix it, usually 3rd party API's have a CORS management sectio... |
To achieve the menu popup functionality, you should prefer using the `checkbox input` of HTML alongside the `:checked` CSS property.
This would also help you to further add more functions w.r.t. the state of the input box, hence you will able to get an effect of `menu is open` or `menu is closed` as a property
T... |
Minimize the sum of squared errors between the experimental and predicted data in order to estimate two optimum parameters by using matlab |
|matlab| |
null |
When using **kubectl get nodes**, the connection refused error you are experiencing is probably caused by the way your Ansible playbook handles the kubeconfig file.
**See how to resolve the problem and make calico deployment possible here.**
- Make sure the master node's Kubernetes API server is up and worki... |
Method threw 'org.hibernate.LazyInitializationException' exception. Cannot evaluate com.esewa.admin.domain.Departments$HibernateProxy$ekCkdrrd.toString()
While i was fetching the entity its data is coming perfectly fine but the related mapping data could not able to fetch though my mapping in manytoone and its defau... |
Problem While Fetching the Entity data and its related Entity data with JPA(Lazy Initialization Exception) |
|java|spring-boot|hibernate|jpa|jpql| |
null |
I have a numpy array and corresponding row and column indices:
```
mat = np.array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
row_idx = np.array([0, 0, 0,
0, 0, 0,
1, 1, 1])
col_idx = np.array([0, 1, 2,
0, 1, 2,
... |
|php|html|forms|file|mysqli| |
164b: f3 0f 1e fa endbr64
164f: 55 push %rbp
1650: 53 push %rbx
1651: 48 83 ec 28 sub $0x28,%rsp
1655: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax
165c: 00 00
... |
Chrome mobile phone.
There has to be a way to remove it?
It happens in the code example I provided also.
I can see it when the buttons are clicked via mobile.
Does anyone on here know what I am referring to?
When I tap one of the buttons via mobile, there is a white flash, how do I disable or remove that... |
Is there any library available to encode these if present as values eg. can be html attributes, js events, scripts, expressions evaluating to true? Though it should escape values like ">50000" or "<232" i.e any "</>" used with numeric values. Or how to encode these based on whitelisting etc?
<script>alert(17098... |
i've been through the same problem but in my case with **typeorm**
but i think my solution will works for you.
what i did is implement simple parser that take `stingifiedJsonObjectQuery` which is JSON string that represent **where** from client
and parse it's to **typeorm object**.
that's snippet from my product... |
I'm wondering if the SamuelSackey code has an error, in
lib/supabase/server-client the code is not spreading the options.
See lines 18 and 22 from the repo (https://github.com/SamuelSackey/nextjs-supabase-example/blob/main/src/lib/supabase/server-client.ts)
set(name: string, value: string, options: Cookie... |
I am using a Huawei E3372 4G USB dongle on Win8.1. This dongle's settings can be accessed via browser by typing 192.168.8.1 and the user can enable a 4G connection by manually clicking the "Enable mobile data" button.
This is the script I am trying to use to "Enable mobile data" connection, knowing I'm doing somethi... |
How to sanitise request body in spring boot if some attributes contain these values |
|java|spring-boot|xss|encode|sanitization| |
Chrome mobile phone. android.
There has to be a way to remove it?
It happens in the code example I provided also.
I can see it when the buttons are clicked via mobile.
Does anyone on here know what I am referring to?
When I tap one of the buttons via mobile, there is a white flash, how do I disable or re... |
What is the point of this part of an auto-generated JSP page in IntelliJ IDEA?
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
Because I don't see any loss of functionality if I remove this line. What's its purpose? |
What is page contentType in JSP? |
I understand your question. You want the image to "refresh" while the application is being used, so if the source file changes, the image displayed by the widget will also change. There's no 'miracle formula' for this, the two files need to have the same name. Let me explain: we change the name of the image "dog.png" t... |
I wait until the page is loaded and use the "DOMContentLoaded" method to add eventhandlers on some p tags. This works until I open and close the modal. Can someone please tell me why the page fully freezes?
```
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-wid... |
I am writing code for Roman Numeral Converter in browser, currently learning Javascript. Problem is right on checking return statements in console.log. I am getting right answers, but somehow all tests are failing.
CODE:
let resstr="";
``your text`` let resarr=[];
function convertToRoman(num) {
... |
Chrome extension MV3: persistent service worker die after wake up from hibernation |
|google-chrome|google-chrome-extension|service-worker|hibernation| |
When i run ./gradlew genEclipseRuns it fails to build and i get the error
```
PS C:\Users\camer\Desktop\MinecraftCoding\MinecraftJava> ./gradlew genEclipseRuns
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.4/userguid... |
|python|factorial| |
|excel|vba|loops|excel-tables|listobject| |
I am using yarn workspaces in which I have 3 projects.
My-project
folder-1
folder-2
folder-3
Some devs work on folder-1, others on folder-2 and the rest on folder-3. The flow of the release is the following:
- PRs are created on feature branches and merged to develop.
- The... |
Handle workspace/monorepo's deployment with different deployments |
{"Voters":[{"Id":2001654,"DisplayName":"musicamante"},{"Id":354577,"DisplayName":"Chris"},{"Id":9484913,"DisplayName":"Parisa.H.R"}]} |
I wrote a code to call a function from PostgreSQL. In the pgAdmin, I call the function and it works right. This is my code in C#:
_db.Database.SqlQuery<CreateOrderInfo>($"select * from Asset_CreateOrderInfo('{request.Data!.UserId}',{request.Data!.SymbolId})")
The generated command is like this:
select ... |
Passing GUID value through SqlQuery will raise the error: invalid input syntax for type uuid |
|c#|postgresql|entity-framework|entity-framework-core| |
I had to do two things,
First was to remove the separation of client and server and put them both in just one variable.
Second, I followed Mark Rotteveel's suggestion, but I didn't set `AuthClient = Srp256, Srp` as he said, I had to set `AuthClient = Legacy_Auth, Srp, Win_Sspi`.
Anyway, he helped me. |
The main question here for a quick diagnose:<br> **Does the AWS IAM role is eventually being used?**
You can see it when you enter the aws console UI inside the role details you should see **when it was last used** (don't trust on the column in the external view where you can see all roles with a search bar, I saw s... |
Use single `&` :
set "var1=a" & set "var2=b"
echo My two variables: %var1% %var2%
Output:
C:\>set "var1=a" & set "var2=b"
C:\>echo My two variables: %var1% %var2%
My two variables: a b
C:\> |
upgrade your nodejs to LTS version this is more suitable version even I have also same issue but after upgrading to LTS version I got the Answer
|
I'm trying to develop a school schedule generator in JavaScript for a high school with various subjects, teachers, and classes. The goal is to create a balanced and c schedule that minimizes conflicts while considering teacher preferences and availability.
**Specific Challenge:**
I'm struggling with the algorithm... |
Building a School Schedule Generator |
|javascript|algorithm|scheduling|schedule| |
null |
I have a numpy array and corresponding row and column indices:
```
mat = np.array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
row_idx = np.array([0, 0, 0,
0, 0, 0,
1, 1, 1])
col_idx = np.array([0, 1, 2,
0, 1, 2,
... |
Turns out, the inverse relationship was causing the issue.
Previously, I had the relationship between Order and Item defined as
@Model
class Order: Decodable {
@Attribute(.unique) var orderId: String
var items: [Item]
}
@Model
class Item: Decodable {
@Attribute(.uniq... |
I want to make a function where I can pass in a selector name and a property and get back the css rule that matches.
for example, If I had a css class that is called "hedgehog" that applies a background color "blue", I want to call getCssTheme("hedgehog", "backgroundColor") and get back "blue".
I think I got close... |
How to "Enable mobile data" on a Huawei E3372 4G USB dongle using a bash script in Windows |
|bash|curl|usb|4g|dongle| |