instruction stringlengths 0 30k ⌀ |
|---|
Trying to convert macro to a function but cannot concatenate inputs |
|c++|macros| |
echarts gives one config key say `coordinateSystem`. for more info:[click here][1]
Here, I have implemented basic example: [EXAMPLE][2]
[1]: https://echarts.apache.org/en/option.html#series-graph.coordinateSystem
[2]: https://echarts.apache.org/examples/en/editor.html?c=graph-grid&code=MYewdgzgLgBAhgDwJYQ... |
|java|testing|spring-webflux| |
{"Voters":[{"Id":8182118,"DisplayName":"Masklinn"},{"Id":2756409,"DisplayName":"TylerH"},{"Id":2324154,"DisplayName":"Dan Mullin"}]} |
|r|math|numerical-integration|integral|equation-solving| |
{"Voters":[{"Id":4294399,"DisplayName":"General Grievance"},{"Id":286934,"DisplayName":"Progman"},{"Id":1168588,"DisplayName":"PaulProgrammer"}]} |
- Mitmproxy: 10.2.4
- Python: 3.10.12
See [this answer][1] for adding cookies to the response.
```python
from mitmproxy import http, flow
def request(flow: flow):
headers = [
(b'set-cookie', b'name1=value1'),
(b'set-cookie', b'name2=value2'),
(b'content-type', b'text/html'),
]
flow.re... |
{"Voters":[{"Id":1968182,"DisplayName":"Ulrich Eckhardt"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":2324154,"DisplayName":"Dan Mullin"}],"SiteSpecificCloseReasonIds":[11]} |
|r|area|curve|numerical-integration|integral| |
|python|visual-studio-code|terminal| |
You need to break down your code a little to make the "Translate" a function which just translates the text passed to it.
Example:
```lang-vb
Option Explicit
Const FROM_LANG As String = "es"
Const TO_LANG As String = "en"
Sub TranslateActiveWorkbook()
Dim wb As Workbook, ws As Worksheet, shp As Obj... |
Embedded google map throws net::ERR_BLOCKED_BY_CLIENT in chromium(Brave) browser |
|google-maps|google-chrome-extension|brave| |
I have adapted to R a python code to plot these charts:
[![Plot generated with Python][1]][1]
[![enter image description here][2]][2]
I simulate the regression lines with `x_plot <- seq(min(market_excess_return), max(market_excess_return), length.out = 100)`
However, when I plot the regression lines to i... |
How can I plot a vector with 100 regression lines within a ggplot? |
|r|ggplot2|plot|geom| |
In PyCharm 2023.3.2 (Professional Edition) on the Database toolbar, there is a "+" for adding a source. In the dropdown menu from the "+", the first choice is to specify a data source by database. Don't choose that.
Skip down to "Data Source by Path". That works! |
PineScript v5 : Working with various timeframe inside script irrespective of timeframe selected in charts |
Here's the corrected version of your text:
First, you can perform a connection test from your client.
```bash
tnsping UWBSDBPROD
```
If this is successful, try to connect with sqlplus:
```bash
sqlplus whatsappdb/whatsapp@orcl
```
or
```bash
sqlplus whatsappdb/whatsapp@10.70.236.30/UWBSDBPROD
```... |
I have created a system whereby you can alter the position of points in game time, which are then connected with a line renderer to make a shape. However I then need to apply a mass to the line renderer that is specific to its length. I'm guessing this would involve something around adding a rigidbody to the line rende... |
Although not explicitly stated in the accepted answer, the position of where the commands are placed in the configuration files is important.
It was alluded to, but not exactly stated.
If the desire result is not seen in gvim, then try adding the lines
:highlight ColorColumn guibg=blue
at the end of the ~/.gvimrc f... |
There is an article by [Dipesh Shah](https://sdipesh.medium.com/nginx-ingress-error-retrieving-resource-lock-ingress-pods-missing-load-balancer-ip-addresses-e3938884ef8d) with the same error encountered. As per the article it might be a permission issue with the service account for ingress controller while acquiring le... |
I am trying to build a Policy definition to list out the users who have not enabled MFA in Azure.
I saw that i can't target users through Policy but my manager is being stubborn upon finding a way to get this through policy only.
Any solutions or views?
I tried altering the built-in policy which requires users t... |
How to audit MFA status of users in Azure |
|azure|multi-factor-authentication|azure-policy|policies| |
null |
I am looking for a code, or a sample code that can have a predefined set of hex values and that can find the 3 used values within to generate a certain value.
let's say I have a value of : 0x50158A51
this is a 4 byte (32 bit) hex value
now i need to find the values which when added or subtracted (from the ... |
> How can I use the primary key multiple times?
You can't. [A primary key must be unique](https://www.w3schools.com/sql/sql_primarykey.ASP).
> How do I get my ID to stay as 62381 for example within userInput.primarykey and not increment?
Don't. Leave the ID as is and do not insert your own. [`integer primary k... |
I have a code to insert data into a table in MYSQL DB for some reason it is inserting the information twice and I require it only to be loaded once
// Create connection
$conn = new mysqli($host, $username, $password, $db_name);
// Check connection
if ($conn->connect_error) {
die("Connecti... |
SQL Statement inserts double data into MYSQL DB |
|php|mysql| |
Long story short --> YES and NO.
**NO -->** Strictly speaking you need not enable External Shuffle Service. This means in some cases re-compuation.
**YES -->** You may wish to avoid re-computation, hence the use of External Shuffle Service is advised, from some time ago already.
There are some caveats. You ca... |
A Python script is executed by a QProcess. Within this script, a specific file should be opened and written to. The file path should always be `\\127.0.0.1\folder\myfile.json`.
def write_to_json(IP, slice_id, json_lines):
#IP = "127.0.0.1" (or any other network id as str)
#slice_id = 1
... |
{"Voters":[{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":7909676,"DisplayName":"Leeroy Hannigan"},{"Id":13070,"DisplayName":"Mark B"}],"SiteSpecificCloseReasonIds":[16]} |
I wanted to solve this problem: [GCD on directed graph](https://www.hackerearth.com/practice/algorithms/graphs/strongly-connected-components/practice-problems/algorithm/gcd-on-directed-graph-1122228a/)
I'm new to SCC, topological ordering, Kosajaru algorithm etc.
Generally, I think that the more nodes we use in p... |
I am using react markdown library. Here is my code:
```
import Markdown from 'react-markdown';
import PreClass from './PreClass';
type MarkdownFormatTextProps = {
markdown: string;
tagName?: string;
};
const MarkdownFormatText = ({ markdown, tagName }: MarkdownFormatTextProps) => {
return (
<articl... |
Markdown rendering error when typing: ``Hello |
|javascript|reactjs|next.js|r-markdown|markdown| |
null |
{"Voters":[{"Id":6436545,"DisplayName":"jdobres"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17303805,"DisplayName":"zephryl"}],"SiteSpecificCloseReasonIds":[13]} |
I have a table that has date range and i want to calculate the days that has been elapsed between 2 date
|workorder|sequence|start date|end date|
|---------|--------|----------|--------|
| 123 | 1 | 2024-01-02 |2024-01-05 |
| 123 | 2 | 2024-02-01 |2024-02-06 |
| 123 | 3 | 2024-02-10 |2024-02-11 |
| 200 | ... |
"wrong model type for regression" when attempting multinomial model with caret |
I am trying to transcribe Twilio voice call in real-time with WebSockets. Twilio has multiple examples for this. I am following this one: https://www.twilio.com/en-us/blog/live-transcribing-phone-calls-using-twilio-media-streams-and-google-speech-text
It works as expected. Basically, you call your Twilio number and ... |
Python pillow library text align center |
i am having a bit of trouble with a sed command. i need to delete the first 15 lines which contain a specified word from a file. some help would be appreciated.
the thing is my sed command only goes through the first 15 lines, no matter if they contain the word or not. it deletes the lines containing the word, but n... |
sed one-liner for deleting lines containing a certain word |
|shell|sed| |
null |
This script plots Nadaraya-Watson excursions outside a channel (envelope). Nadaraya-Watson is a type of Kernel regression method that makes use of the Gaussian kernel as a weighting function. Unlike a regular moving average whose degree of smoothness is commonly determined by the length of its calculation window, the d... |
Since there isn't an example that actually uses `Uri.EscapeDataString`, I'll add mine.
```cs
using System;
var email = "email@gmail.com";
var url = $"https://api.domain.com/send-email?email={Uri.EscapeDataString(email)}";
``` |
I am trying to get basic Geometry support for Oracle into SQL Alchemy since Geoalchemy2 doesn't support it. I've created a custom datatype that works perfectly if geometries aren't too big. But since I use wkb or wkt as an input, large geometries (in terms of nr of coordinates) cause the varchar2 limit to be exceeded. ... |
I believe the values in your initial example are wrong, particularly on column `order_id`, as they are different from the ones in your expected result. Besides, the values on column `cost_price` of your expected result don't seem to follow the logic you described.
IIUC, and assuming these dataframes initially:
```n... |
{"Voters":[{"Id":16646078,"DisplayName":"e-motta"}]} |
|c++| |
The application uses middleware to verify user authorization. The JWT token for authorization is stored in cookies. When the application is loaded, the user's data is stored in the pinia storage, and the protected paths are displayed correctly during authorization, including after the page is reloaded. However, if the ... |
Why encrypted stored procedures are taking a long time to execute in SQL Server 2022?
Is there any specific settings or configuration at server level?
Our large procedures are working fine in SQL Server 2019 with encryption. But in SQL Server 2022 It's taking a very long time to execute.
Need some setting or c... |
Why encrypted stored procedures are taking a long time to execute in SQL Server 2022? |
Use this version, which doesn't retain self:
```
let timer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true, block: { [weak self] _ in
self?.func()
})
```
And invalidate the timer in deinit:
```
deinit {
self.timer?.invalidate()
}
```
|
|sql-server|encryption|stored-procedures|procedure|sql-server-2022| |
This is the section of code I am talking about. I have ensured all braces are accurate. At the end I have two other print statements to prove that the correct values ARE in the array, but when I use System.out.printf to try and print the entire index, it just returns 0.00. I have printed indexes with System.out.print(a... |
|java|arrays|indexing| |
I maintain a GWT multi-module maven project dated back to the good old golden GWT-days.
We were able to debug the GWT application till now relying on classic dev mode but now due
to security concerns , we are trying to setup our dev environment (Eclipse IDE) to use Super Dev Mode.
But when it comes to development... |
See the following example where case B is undesirable and either we want case A or case C. I could envisage this being detected by (i) (ii) or (iii) below, but I can't see how to do this in ESLint?
```
function throw1 (j) {
if (j == 1) throw j;
return j;
}
var i;
for (i = 0; i < 3; i ++) { let r; ... |
ESLint rules for var / let and/or uninitialised variables |
|eslint| |
null |
|wordpress| |
You’re correct that Azure Functions currently don’t offer pre-invocation hooks with access to the HTTP request directly. However, there are alternative approaches to achieve token-based authentication across multiple functions:
**1\. Function-Level Authentication (Simple Cases):**
If your authentication logic is ... |
How to stream audio of <Dial> to websocket? |
I'm currently working on a JavaScript project using EJS (Embedded JavaScript Templates) in Visual Studio Code and encountering a couple of issues that I need help with.
Environment:
- ubuntu Studio
- Visual Studio Code
- Node.js (v21.5.0)
- Express.js
- EJS
Problem:
- Syntax Highlighting: The EJS syntax, ... |
We are using Branch's iOS SDK version `2.2.0`.
And the minimum version of our app is iOS 13, and the Xcode version is 15.2.
Whenever an issue occurs in Firebase Crashlytics, the version of BranchSDK is also included as a KEY value.
Is it possible to prevent `io.branch.sdk.version` from being displayed as a Key in ... |
Use windows docker to build redis and set bind to 0.0.0.0. Turn off protected mode. In redis-cli, you can only use 127.0.0.1 to access the local redis server. It prompts "Could not connect to Redis at 192.168.*.*:6379: Connection refused", but I found that using 192.168.*.* can access those redis-services that use dock... |
Docker builds redis, mounts the host network and uses 192.168.*.* to access the redis server and is denied |
|docker|redis|redis-sentinel| |
null |
Im trying to build a docker image and I'm running into a compatibility issue when building the Docker file.
The Docker file below leads to a successful build. But when I add "tensorflow-gpu" it fails with a requirements error. Im not sure how to isolate this issue, so any guidance will be appreciated!
Docker fi... |
Docker: No matching distribution found for tensorboard~=2.15.0 |
|python|docker|tensorflow|horovod| |
hey so am new in java and haven't gotten in my head the logic on how to print an array backwards. I just don't understand how it flows using forloop
its fairly easy and chatgpt could easily do it whats bothering me though is i dont understand it so if it could be provided with proper explanation i would appreciate i... |
For everyone having the same issue,
the solution was a bit different.
So instead of
getKoin().getViewModel(owner = {
ViewModelOwner.fromAny(activity)
})
I had to get the viewModel directly like that:
activity.viewModelScoped<MySharedViewModel>(getKoin().scopeRegistry.rootScope... |
Is it mandatory to represent the parse tree in a table with 5 rows the way you did?
If the smallest possible subtree _always_ has three nodes connected by two vectors (except for the single-node edge case), we could use a different representation which only requires 2 rows.
```
Columns:
EI: expression_id P... |
I am trying to add the image in axis text. I am using RadarGraph from SVGGraph library.
[](https://i.stack.imgur.com/zNjaE.png)
I am not able to find a solution for that.
**What I tried**
I found an option `axis_text_callback_x` but I am not able to ... |
How to set image in axis text in SVGGraph? |
|php|svg|svggraph| |
null |
>But I'm looking for more options
Another approach to handle duplicate data in ADX is by using `distinct`. It removes the duplicate data from the table.
Below is the sample table `TableF` is created with duplicate data as shown below.

Use below ... |
Say there is a 3D geometry in a box with N^3 elements or voxels.
How to estimate the memory size of the voxelized geometry given that the elements are binary (1 or 0)? Is it simply N^3 bits or is there a lower size version such that the data is compressed? |
How to estimate the memory size of a binary voxelized geometry? |
|memory|3d|geometry|voxel| |
Try to load your image without the public in the file path as below.
<Image src={'/icons/handshake_icon.png'} alt={props.topicName} fill={true} />
Files inside the public can then be referenced by your code starting from the base URL (/)
For example, the file public/avatars/me.png can be viewed by visiting the... |
I'm developing an Android application in Kotlin, and I'm encountering an issue related to the S Pen functionality on Samsung devices. Specifically, I want to prevent the Air Command menu from opening when the user presses the button on the S Pen.
I've searched extensively but haven't found a clear solution. Is there... |
Is it possible to block the S Pen Air Command menu from opening with the pen button press in my application in Android Studio? |
|android|kotlin|motionevent| |
null |
When I try to log in, the Redux reducers update the state correctly, but the login page doesn't navigate to the home page immediately. However, if I click the login button again, then it navigates to the home page. The backend seems to be working fine, and when I check with Redux DevTools, it shows that the state has b... |
Doesnt update state after successfully fulfilled Reducers |
|reactjs|ecmascript-6|react-redux|redux-toolkit|redux-thunk| |
null |
Here is a way.
It is possible with JavaScript to get the percentage of the zoom start position and the percentage of the zoom end position. They are given by the `datazoom` event. It is also possible to get the range of the x-axis. So one can get the min x-value and the max x-value of the zoomed region. And send the... |