instruction
stringlengths
0
30k
Protobuf library version: 3.21.12 This is my proto file: ``` syntax = "proto2"; message MyBidRequest { optional string req_id = 1; optional int32 tmax = 2; } ``` ``` // Read JSON string from a file or any source std::string json_string = R"( { "req_id": 1, "tmax": 77...
Put a for loop iteration in a Bootstrap group list button click
|javascript|html|
Have you tried something like this: request.AddParameter(new JsonParameter("data", <jsonObjectOrString>)) In addition to your already existing request.AddFile of course.
[![picture of the white space][1]][1] I want to make the white space around flex items smaller. This is essentially a parent flex box with child flex boxes. heres my html: ``` <div class="parent-box"> <div class="contain"> <div class="modal"> <h2>Plans For The Site</h2> ...
trying to make smaller bars in a flexbox
|html|css|flexbox|
null
N.B. This function will only work if you are using an AutoFilter. <!-- language-all:lang-vb --> Function GetFirstItem(ws As Worksheet) AS Long GetFirstItem = -1 'Return -1 if there are no items If Not ws.AutoFilterMode Then Exit Function 'Return -1 if there is no AutoFilter Dim l...
This answer might help - it got rid of a bunch of 'changes' for me, with a checkout that compared identical to HEAD except that some of the changes were the (normalised) LFS pointers which should have been there, instead of the binary files which actually lived on the branch. https://stackoverflow.com/a/14515846/103...
You can assign `color` to a vector created by `ifelse` inside `aes`. This does not need to be a vector of color names, rather just a vector of the labels you wish applied to the legend, for example `color = ifelse(depth1 > 5, 'High', 'Low')` It's not clear from the question whether you want `df1` and `df2` to have t...
null
SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(phoneNo;9677498416, null, sms, null, null);
I'm using header on php when I want to change after function. Now I want to use on jQuery. if ($('form #response').hasClass('success')) { setTimeout("$('form #response').fadeOut('fast')", 5000); return window.location = index.php; } This line does not work - I want to change page wh...
null
Mysql workbench returns this error: ``` Incompatible/nonstandard server version or connection protocol detected (11.3.2). A connection to this database can be established but some MySQL Workbench features may not work properly since the database is not fully compatible with the supported versions of MySQL. ``` ...
I have an Asyncio program that I want to have some loop functions be "safe" from cancellation and others to be cancelled if an exception is raised (i.e. Tasks 0-2 need to be "safe" and Tasks 3-5 need to be cancellable. I read about how `TaskGroup`s in Python 3.11 can allow for the latter of these two points. So I ...
I want to decide a design scenario on data storing using corda states. I like to know the best way to connect stateA with stateB where stateB can be linked with 3 different types. **Option 1:** Say, I have an **InsuranceServiceState** having insuranceType: String // values will be "InsuranceTypeA", "Insur...
I see that MS Accessibility Insights claims to cover WCAG 2.2, which it does via manual checks. However, it does not run the automatic check for target size that was added as part of axe-core 4.8 in Sept 2023. My question is when will Accessibility Insights axe-core version (currently 4.7.2) next be updated to incl...
What is the timeline for updating MS Accessibility Insights to use axe-core 4.8.n?
|accessibility-insights|
null
I tried to fetch details of resource owners created an year ago using powershell script but iam getting errors. Is it possible to create one? This is the code I used: ```powershell foreach ($resource in $resources) { $createdBy = $resource.Properties.createdBy if ($createdBy -and $createdBy.userPrinc...
null
I want to update user meta after the user submits a form. `function updateUserType(){update_user_meta` works as expected alone, however it does not work when the form is called with `do_shortcode`. echo do_shortcode('[contact-form-7 id="031c4e8" title="Dosya"]'); add_action( 'wpcf7_before_send_mail', 'updateUse...
Custom 2D Convolution not sharpening Image
|python|opencv|image-processing|
When you want to get `data-something` in JS both work or when the "data-something" is added in JS with `dataset.something` and want to get it. But performance getAttribute is much better than dataset (test performance reference) getAttribute x 122,465 ops/sec ±4.62% (60 runs sampled) dataset x 922 ops/sec ±...
when using es modules you must load **`fs`** module to read and write file support. ```javascript import * as fs from 'fs'; // Set internal fs instance XLSX.set_fs(fs); ``` accordion to this issue : [issue][1] ```javascript import * as XLSX from 'xlsx' import * as fs from 'fs'; XLSX.set_fs(fs); ...
Not possible. `window_w32.cpp` always saves window positions to registry. You'd need to change OpenCV source to add this feature. And you'd need to think about how to convey this bit of information, either before you create any windows or when you create each window.
Depending on what exactly you mean by "the text", you probably want the [`get_body` method.](https://docs.python.org/3/library/email.message.html#email.message.EmailMessage.get_body) But you are thoroughly mangling the email before you get to that point. What you receive from the server isn't "HTML" and converting it t...
I have everything correctly setup in my program.cs on backend correct url names etc but I cannot get both clients to navigate to the page when testing locally with two different browsers using websockets over http/ws MatchMakingController.cs ``` [HttpPost("joinQueue")] public async Task<IActionResult> JoinQueue...
null
I have been working on backend for a Java webApp and have been having difficulty getting openjpa to create my database schema. I am using openjpa, with tomEE. ``` <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XML...
openjpa not creating schema from persistence.xml
|java|jpa|schema|apache-tomee|persistence.xml|
null
I was trying to generate a presigned URL for an S3 bucket in the `me-central-1` region using the boto3 library, as demonstrated below ``` client = boto3.client("s3", region_name="me-central-1") return client.generate_presigned_url( ClientMethod="put_object", Params={"Bucket": bucket, "Key": path}, ) ...
Wordpress update user meta when the user submits form (form called with do_shortcode)
|php|wordpress|contact-form-7|usermetadata|
|gcc|autotools|automake|
Ubuntu 20.04 Python 3.8 I'm using a python file (not written by me) with a U-Net and custom Loss functions. The code was written for tensorflow==2.13.0, but my GPU cluster only has tensorflow==2.2.0 (or lower). The available code isn't compatible with this version. Specifically the 'if' statement in update_state. ...
I have a table looks like this: product price99 price100 A 2 1 B 3 2 .. I don't know how to do that in MySQL to explode that into a format like this, like using the melt and cast function in R. product quantity_min quantity_max price ...
Explode one line to multiple in MySQL
Ii am trying to create standard logic app using arm template with workflows in it, but it only creates standard logic app without workflow.At the same time it creates consumption logic app also. I tried adding microsoft.logic/workflows under resources and added action and trigger inside. But this is not helping
I am trying create standard logic app with workflows in it using arm template
|workflow|azure-logic-apps|standards|
null
This has been like 4 days I try to fix this issue, I fixed this issue in http but in https it doesn't work (the server and the website are in https) For the server I use NodeJS, Express, here is the middleware code: server/api/index.ts ```ts export default function APIHandler(app: e.Express) { app.use( ...
{"Voters":[{"Id":23450026,"DisplayName":"Clayton Manda"}],"DeleteType":1}
I want to get "VacationCount" from my offday string. I have tried this code, but it does not work. Where is my mistake? ``` val offDaysString = "8888856" val returnPending = 20 //How many day return Pending var vacationCount = 0 if (offDaysString != null){ val offDays: Array<String> = offDaysString.t...
The best place to do validation would be at the setters function,doing validation at `def __init__()` can be by passed using dot notation **Example** Suppose we have a class account that takes in name and amount. The name shouldnt be blank and amount should be negative. ``` class Account: def __init__(self,...
When you want to get `data-something` in JS both work or when the "data-something" is added in JS with `dataset.something` and want to get it. But performance getAttribute is much better than dataset ([test performance reference][1]) getAttribute x 122,465 ops/sec ±4.62% (60 runs sampled) dataset x 922 ops/...
**Feb 2024**<br>Obtain an iterator by calling the JsonNode's `iterator()` method, and go on... JsonNode array = datasets.get("datasets"); if (array.isArray()) { Iterator<JsonNode> itr = array.iterator(); /* Set up a loop that makes a call to hasNext(). Have the loop it...
I have a very basic requirement on my frontend where I want to update the incoming images every second but I'm not sure of how to do it... Following is my tag where I want to update the values - <img id="receivedImage" src="<%= imageData %>" alt="Received Frame"> It receives data from the backend - ...
Mysql workbench is not compatible with Mariadb ... and it doesn't work
|macos|mariadb|mysql-workbench|
How about this? Not quite as seamless but a bit closer to what you want. diff = df["Input"] - df["Input"].shift(1) diff.columns = pd.MultiIndex.from_product([["Diff"], diff.columns]) df = pd.concat([df, diff], axis=1) Regarding the second part of your question (really a separate question), the probl...
For such a query: ``` select s.start_time::timestamptz at time zone 'America/New_York' as t1, s.start_time::timestamptz at time zone 'UTC' as t2, s.start_time::timestamptz at time zone 'UTC' at time zone 'America/New_York' as t3, s.start_time from my_table s order by id desc; ``` I get results l...
`::timestamptz at time zone <zone1> at time zone <zone2>` returns wrong result
|timezone|psql|
Here is my solution, first sort the array as then call the recursive function. public static void main(String[] args) { int[] input = new int[]{2, 7, 11, 15}; Arrays.sort(input); System.out.println(twoSumWithRecursion(input, 99, 0, input.length-1)); } private static Strin...
I am deploying ml model using Gradio, after deploying on Gradio I get error after I input and output shows error code for this output is ``` import gradio as gr import numpy as np from sklearn.linear_model import LinearRegression from sklearn.preprocessing import StandardScaler, MinMaxScaler # Sample data (r...
How to continuously update HTML tag to get values from EJS and backend?
|html|node.js|ejs|
There is no difference. `waitKey()`'s first argument's default is 0. If you call the function without arguments, the default argument is used. Nothing in C++ or Python *forbids* you from passing values equal to the defaults. It is not an error and not a problem. It is a matter of style.
If you are looking to have a single producer of some data and multiple "consumers" of that data, then the following code uses `Condition` instances with notification. For demo purposes the producer only produces 10 pieces of data and we have 3 consumers. This will keep the output to a reasonable length: **Update Usi...
Update == Per the comments, OP clarifies: > Yes, I want to capture any paragraph that contains only emphasized text, is it enclosed in one or more `em` tags. Therefore, this updated XPath, //p[em][not(node()[not(self::em)])] will select all `p` elements with one or more `em` child elements, but no oth...
It seems to me that it's not supported directly. You will have to deploy it then use the endpoint to generate predictions like described in [this notebook.][1] instances = [ { "prompt": "My favourite condiment is", "n": 1, "max_tokens": 200, "temperatu...
there is an issue in Django with the LogoutView. when I try to enter the link 'accounts/logout' django server pops in the cmd: Method Not Allowed (GET): /accounts/logout/ Method Not Allowed: /accounts/logout/ [24/Feb/2024 13:48:11] "GET /accounts/logout/ HTTP/1.1" 405 0 this is the view file content...
Tried everything, the cookies don't set but I have the right headers, cors, things, fetch parameter, etc
|node.js|express|cookies|axios|cors|
null
It seems you are using the `lombok-maven-plugin` to perform the delombok task during a Maven build. That is a third-party plugin not maintained by the lombok team, and it has not been updated for several lombok versions. The latest plugin version 1.18.20.0 uses lombok 1.18.20, which does *not* work for JDK 17 or JDK 21...
We have ToggleButton iniherited from Button which contains property like Content and IsChecked. It is used for having checked and unchecked states for buttons. Is there a way to handle Toggle buttons in Maui? I have tried using RadioButtons which indirectly handles ToggleButtons, I need a direct way to handle tog...
How to achieve ToggleButton in WPF using Maui
|wpf|maui|maui-community-toolkit|maui-windows|
null
I installed and configure the SQL Server Reporting Service 2022 on a Windows Server 2022. However, upon accessing the report server portal (native mode configured) the same admin account used to install the Reporting Service is denied access to the ReportServer configurations page where I can add users and set permissi...
How to resolve the reAccessDenied from SQL Server Reporting Service
|sql|sql-server|reporting-services|
No class is supplied in `java.time.*` to do this. But extra things that did not fit in the JDK are available in [ThreeTen-Extre][1]. In this case, the class `PerdodDuration` is appropriate, which combines a `Period` and a `Duration`. (The two concepts are sufficiently different, particularly wrt days, that they are gen...
This was working on Ubuntu until recently. I have had a dual 32/64 bit development environment for several year and recently my 32 bit apps have stopped running. This seems to fail sometimes because the binfmt-support service fails to start. (However even on new clean install of Ubuntu where the service does not ...
I encountered an issue while deploying my Next.js application, and I'm seeking assistance in resolving it. The deployment process fails with the following error: ``` RangeError: Maximum call stack size exceeded at RegExp.exec (<anonymous>) at create (/vercel/path0/node_modules/next/dist/compiled/micromatc...
null
I have a text file with a base64 encoded value, and I tried to decode that text file and save it into a PDF format. Below is my code File inputfile = new File('/Users/Downloads/DownloadedPDF.txt') File outputfile = new File('/Users/Downloads/test64.pdf') byte[] data try { FileInputStream fi...
Base 64 : Illegal base64 character 3 Exception
|java|base64|decode|base64url|
create a file name setup.py paste the below code: ``` import subprocess import sys from git import Repo print("Cloning repo...") git_url = "https://github.com/Shubham654/Tensorflow-examples.git" repo_dir = "tensorflow-model-maker" try: Repo.clone_from(git_url, repo_dir) except: pass ...
What you can do is make a red one in illustrator and then create a script in your DOM file <script> const myPng = 'path/to/png'; const redPng = 'path/to/redPng'; // get the node (say foo) you want this change to take effect const foobar = document.querySelector...
A Big Issue in django LoginView
|python|django|django-views|django-forms|
My document for content is a php document (contact.php). I have a form submission to email. However, I am not knowledgable in php. I have the form on the intial webpage, however, after submitting an invalid error, I get the text that I want, but the form, button, text and footer all disppear. How do I keep it on the n...
So, it works perfectly fine when I open it, but when I click on it (on the game, not on the window, I can even move the window and it still working) it just stops working And, if I do it while the character is walking, it just keeps on walking forever. Can someone help me? ``` package frame_canvas; import java....
My game is losing focus when I click on the Canvas
I had a SES templated email with a line looking line this: `<h6>Welcome {{usernamee}}</h6>` My emails were never being sent and it took me forever to see I had a typo in my template. Looking around, SNS seems to be the one would should tell me when the rendering of the email has failed. I have a SNS with a sim...
SNS failed to warn about a missing variable in a SES Templated email
|amazon-web-services|amazon-sns|amazon-ses|
After opening a R-engine. I assigned to it a dataframe, that I get successfully from database. After printing sone values from the R-engine I found out, that all the string values have a mojibake like following example: "2024-00010005" -> "ÿþ2024-00010005ÿþ" ```java if(conn != null) { try{ if(!conn.is...
Recently we released the first release candidate of a [high-performance JSON masker library in Java with no runtime dependencies](https://github.com/Breus/JSON-masker) which you might want to use to do this. It works on any JSON value type (with any nesting in both JSON objects and arrays), has an extensive and con...