question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72,866,592 | How to create a character counter in react?<p>I am new and creating something with react for the first time. i want to create a character counter in a textarea in react. The counter should have a maximum length of 800 characters. i created this code, but i don't know how to include const without getting an error messag... | <p>Here is an example of textarea with react and useState hook.
useState return an array of getter and setter of a state.
the text value is stored in <code>text</code> and updated with <code>setState</code>.
textarea consume the state in handler with <code>value</code> and <code>onChange</code> parameter respectively.<... | How to create a character counter in react? | javascript|reactjs|constants|charactercount | 0 | 57 | 3 | 72,867,192 | 72,867,192 | 0 | true | 2022-07-05T08:54:11.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a character counter in react?<p>I am new and creating something with react for the first time. i want to create a character counter in a textar... |
72,866,143 | MongoDB Aggregate functions convert object array to string array<p>I have some documents in a collection. Every document has a challenge_id field. I want to map those document array into a string array. The final string array should consist of challenge ids from each document</p>
<p>input:</p>
<pre><code>[
{
_id:... | <p>You can use <code>$group</code> like this:</p>
<pre><code>db.collection.aggregate([
{$group: {_id: 0, res: {$push: {$toString: "$challenge_id"}}}},
{$project: {res: 1, _id: 0}}
])
</code></pre>
<p>See how it works on the <a href="https://mongoplayground.net/p/iSM8yzvruED" rel="nofollow noreferrer">play... | MongoDB Aggregate functions convert object array to string array | mongodb|mongoose|mongodb-query|nosql|aggregate-functions | 0 | 57 | 1 | 72,867,686 | 72,867,686 | 0 | true | 2022-07-05T08:17:36.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MongoDB Aggregate functions convert object array to string array<p>I have some documents in a collection. Every document has a challenge_id field. I want to ... |
72,873,670 | Need to get the array of objects from spring-boot to react table<p>OrderMed.js</p>
<pre><code>export default class OrderMed extends Component {
constructor(props){
super(props);
this.state = {
Meds: []
}
}
componentDidMount(){
axios.get("http://localhost:8081/api/v1/ivm/customer/invento... | <pre><code> componentDidMount(){
axios.get("http://localhost:8081/api/v1/ivm/customer/inventory/medicines")
.then(response => {
console.log(response)
})
.then((data) =>{
this.setState({Meds: data.data.medicineList});
})
</code></pre>
<p>Does this make sense?</p> | Need to get the array of objects from spring-boot to react table | reactjs|spring-boot | 0 | 57 | 2 | 72,875,089 | 72,875,089 | 0 | true | 2022-07-05T17:56:14.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need to get the array of objects from spring-boot to react table<p>OrderMed.js</p>
<pre><code>export default class OrderMed extends Component {
constructor... |
72,876,686 | ASP.NET controller not always appending cookies<p>I've written a controller in asp.net that appends a token cookie after login. When I do the get call directly in the browser to the controller the cookie gets appended and can subsequently be read in request.cookies afterwards. However, when I make the same call from my... | <p>Cookies will not be included by default in cross origin requests in Browsers, so you need to explicitly allow it.</p>
<pre><code>var requestMessage = new HttpRequestMessage
{
...
};
requestMessage.SetBrowserRequestOption("credentials", "include");
</code></pre>
<p>Yo... | ASP.NET controller not always appending cookies | asp.net|cookies|blazor | 0 | 57 | 1 | 72,877,096 | 72,877,096 | 0 | true | 2022-07-06T00:08:15.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ASP.NET controller not always appending cookies<p>I've written a controller in asp.net that appends a token cookie after login. When I do the get call direct... |
72,873,173 | why when i import the excel file into laravel only one column is imported?<p>when i import data to laravel via excel, import is successful. but the data entered is only the top row. can anyone help me to solve it?</p>
<p>This my importTeacher**</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="... | <pre><code> return redirect('/list-guru')->with('success', 'Berhasil menambahkan');
</code></pre>
<p>here when you use return in foreach it goes out from loop
you can use redirect after foreach loop</p> | why when i import the excel file into laravel only one column is imported? | excel|laravel|maatwebsite-excel | 0 | 57 | 1 | 72,878,024 | 72,878,024 | 0 | true | 2022-07-05T17:06:25.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why when i import the excel file into laravel only one column is imported?<p>when i import data to laravel via excel, import is successful. but the data ente... |
72,813,633 | Laravel: "No input file specified" when link to public folder<p>Update 2022-07-06:<br />
I know what the problem is. It's because of "open_basedir". In Plesk support page, says that we can change this parameter, add new path. <a href="https://support.plesk.com/hc/en-us/articles/360006170513" rel="nofollow nor... | <p>It's because of "open_basedir". In Plesk support page, says that we can change this parameter, add new path. <a href="https://support.plesk.com/hc/en-us/articles/360006170513" rel="nofollow noreferrer">https://support.plesk.com/hc/en-us/articles/360006170513</a></p> | Laravel: "No input file specified" when link to public folder | laravel | 0 | 57 | 1 | 72,880,960 | 72,880,960 | 0 | true | 2022-06-30T09:46:06.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel: "No input file specified" when link to public folder<p>Update 2022-07-06:<br />
I know what the problem is. It's because of "open_basedir"... |
72,830,615 | R plotly adding traces in a loop<p>I'm trying to plot many traces on the same figure, thus needing to use a loop but it doesn't work, as you can see in the example below :</p>
<pre><code>Fig3abis<-plot_ly(data=dataresults3ab,x=dataresults3ab[[1]])
for(j in c(100,500,1000,1500))
{
#print(dataresu... | <p>As Limey suggest in the comments, the problem was due to a lazy avaluation problem. I solved it using a lapply loop instead of a for loop.</p> | R plotly adding traces in a loop | r | 0 | 57 | 2 | 72,885,709 | 72,885,709 | 0 | true | 2022-07-01T14:15:22.883Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R plotly adding traces in a loop<p>I'm trying to plot many traces on the same figure, thus needing to use a loop but it doesn't work, as you can see in the e... |
72,880,944 | Extract 5th frame of video & merge into a video using ffmpeg C#<p>I am trying to extract every 5th frame of a video and try to merge it in another video using ffmpeg.</p>
<p>So far, I have tried 2 separate commands & processes :</p>
<ol>
<li>For extracting every 5th frame & storing it in a folder.</li>
</ol>
<p... | <p>Assuming your input is constant framerate (CFR), how about just using a <a href="https://ffmpeg.org/ffmpeg-filters.html#fps-1" rel="nofollow noreferrer"><code>fps</code> filter</a>?</p>
<pre><code>ffmpeg -i INPUT -vf fps=source_fps/5 OUTPUT
</code></pre>
<p>This will pick every 5 frames while maintaining the same pl... | Extract 5th frame of video & merge into a video using ffmpeg C# | c#|.net|.net-core|ffmpeg|video-processing | 0 | 57 | 1 | 72,885,717 | 72,885,717 | 0 | true | 2022-07-06T09:23:03.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract 5th frame of video & merge into a video using ffmpeg C#<p>I am trying to extract every 5th frame of a video and try to merge it in another video usin... |
72,870,208 | How to scrape star ratings displayed as an image set as a background URL?<p>There are some websites that display different star ratings based on a single image set as background, for example: <a href="https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000004gHhLEAU" rel="nofollow noreferrer">https://ap... | <p>As @spickermann mentioned in the comments, the display of the rating image is controlled by the CSS classes. For example, the following has a "appx-rating-stars-45" class that creates the 4.5 star appearance:</p>
<pre><code><span id="appxListingDetailPageId:AppxLayout:j_id841:j_id842:j_id845" ... | How to scrape star ratings displayed as an image set as a background URL? | ruby|selenium|watir | 0 | 57 | 2 | 72,886,035 | 72,886,035 | 0 | true | 2022-07-05T13:22:42.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to scrape star ratings displayed as an image set as a background URL?<p>There are some websites that display different star ratings based on a single ima... |
72,888,635 | Show and hide different divs on clicks on different buttons<p>I am trying to show and hide different div's on click on different buttons. For example, when I click button "1", it shows the block with id="block-1". When I click on button "4", the block with id="block-4" shows and ... | <p>You can achieve what you need with much less code by using common classes to group content by behaviour. You can use <code>data</code> attributes where required to store custom metadata in an element.</p>
<p>In the following example all buttons use the same event handler. The differences come simply from the <code>d... | Show and hide different divs on clicks on different buttons | javascript|html|jquery | 1 | 57 | 1 | 72,888,744 | 72,888,744 | 0 | true | 2022-07-06T18:58:02.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Show and hide different divs on clicks on different buttons<p>I am trying to show and hide different div's on click on different buttons. For example, when I... |
72,889,166 | Bootstrap-5 css files versus scss files<p>I've just started learning a bit about Bootstrap and used npm to install Bootstrap. I noticed under node_modules that there are css files and scss files under Bootstrap. What I know of scss so far is that it's an advanced version of css, so I was wondering what the difference b... | <p>I believe what is ultimately rendered to the browser should be identical out of the box. The difference is that to serve the SCSS to the browser you have to have some build process in your development workflow that outputs the SCSS to CSS before serving it. There are, however, some benefits to using <a href="https... | Bootstrap-5 css files versus scss files | css|node.js|twitter-bootstrap|sass|bootstrap-5 | 1 | 57 | 1 | 72,889,435 | 72,889,435 | 0 | true | 2022-07-06T19:53:26.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bootstrap-5 css files versus scss files<p>I've just started learning a bit about Bootstrap and used npm to install Bootstrap. I noticed under node_modules th... |
72,870,519 | Changing FROM statement with a variable<p>I am trying to change the name of the table I am getting my data from</p>
<p>Like this:
COREPOUT.KUNDE_REA_UDL_202112 --> COREPOUT.KUNDE_REA_UDL_202203</p>
<p>I create my variable like this:</p>
<pre><code>PROC SQL NOPRINT;
SELECT DISTINCT
PERIOKVT_PREV_BANKSL_I_Y... | <p>The solution I ended up with was inspried by @Stu Sztukowski response:</p>
<p>I made a data step to concat the variable and created a macro variable.</p>
<pre><code>data Concat_var;
str_PERIOKVT_PREV_YYMMN6 = CAT("COREPOUT.KUNDE_REA_UDL_",&PERIOKVT_PREV_BANKSL_I_YYMMN6," t1");
run;
PRO... | Changing FROM statement with a variable | sql|sas|enterprise-guide | 1 | 57 | 3 | 72,893,682 | 72,893,682 | 0 | true | 2022-07-05T13:45:04.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing FROM statement with a variable<p>I am trying to change the name of the table I am getting my data from</p>
<p>Like this:
COREPOUT.KUNDE_REA_UDL_2021... |
72,818,820 | Boost Beast gives "The handle is invalid" error after http:async_write<p>Initially I got error "The file handle supplied is invalid". This is because my socket was closed. I corrected that error.</p>
<p>Now I get another error "The handle is invalid"....Any idea what could be the issue</p>
<p>Below ... | <p>Below code works for me...</p>
<pre><code> void BeastResponse::write(http::response<http::file_body>&& responseFile)
{
std::cout << "BeastResponse while file write: " << this << std::endl;
auto self = shared_from_this();
// copy file into the member variable, m_re... | Boost Beast gives "The handle is invalid" error after http:async_write | boost|boost-asio|boost-beast | 0 | 57 | 1 | 72,894,265 | 72,894,265 | 0 | true | 2022-06-30T16:01:02.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Boost Beast gives "The handle is invalid" error after http:async_write<p>Initially I got error "The file handle supplied is invalid". This is becau... |
72,887,336 | QTCreator: Signal-Slots mechanism between classes<p>How are you solving signals/slots mechanism between two classes, if you do not make an object from class(only inherit from class) etc? QTimer, QSerialPort, which is the source of SIGNAL, and in the second class you make connection?</p>
<blockquote>
<p>Is such an appro... | <p>It is impossible to connect classes as mentioned by @Scheff's Cat.</p>
<p>The solution is do not use inheritance from QSerialPort in the <em>usb2can_driver</em>. If I want connect signal of QSerialPort with slot (which is part of second class), I had to create a object from QSerialPort in the constructor of USB2CAN_... | QTCreator: Signal-Slots mechanism between classes | c++|qt|qt-creator|signals-slots | 2 | 57 | 1 | 72,897,261 | 72,897,261 | 0 | true | 2022-07-06T16:57:52.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
QTCreator: Signal-Slots mechanism between classes<p>How are you solving signals/slots mechanism between two classes, if you do not make an object from class(... |
72,900,938 | Failing Tictactoe in c++<p>I'm a beginner in c++, i'm trying to make a tictactoe. My program fails at the part acfter i enter input. When I enter an input, there is no next action from the program like i expected it to ("unvalid", check if win or loose, ask for input again). It only shows blank. like below: a... | <p>You have infinite loop at <code>while (filled == false) { ... }</code>, because <code>filled_f</code> <em>always</em> sets <code>filled</code> to false (and the <code>else if</code> branch of the condition inside this loop as well does so). It's because you most likely missed figure brackets when writing <code>else ... | Failing Tictactoe in c++ | c++ | 1 | 57 | 1 | 72,906,268 | 72,906,268 | 0 | true | 2022-07-07T15:59:52.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Failing Tictactoe in c++<p>I'm a beginner in c++, i'm trying to make a tictactoe. My program fails at the part acfter i enter input. When I enter an input, t... |
72,824,916 | Why my DIV is not showing up in mobile browser but shows on desktop browsers?<p>Very generic issue I am sure, and apologies for the title, but not sure how else to word this.</p>
<p>Background: VisualStudio 2022 preview, .Net 4.8, ASP.Net (not Core)</p>
<p><strong>index.aspx</strong></p>
<pre><code><asp:Content ID=&... | <p>The answer was in lack of design. Basically, I was missing the <code>Site.Mobile.Master</code> mobile version of the <code>Site.Master</code> file, and I had to include the reference to the same CSS for the desktop version. Yes, I wanted the mobile version to act like the desktop!</p>
<blockquote>
<p><webopt:bund... | Why my DIV is not showing up in mobile browser but shows on desktop browsers? | javascript|html|css|iframe|overlay | 0 | 57 | 1 | 72,906,518 | 72,906,518 | 0 | true | 2022-07-01T05:51:41.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why my DIV is not showing up in mobile browser but shows on desktop browsers?<p>Very generic issue I am sure, and apologies for the title, but not sure how e... |
72,909,086 | Update existing test cases blocked in xRay importer<p>I want to update the action, expected result, and description of existing Xray test cases with the xRay importer feature but the import is each time blocked infinitely.</p>
<p><a href="https://i.stack.imgur.com/rMFmL.png" rel="nofollow noreferrer"><img src="https://... | <p>It seems that the request is taking too long. This can be due to many reasons, including your Jira server/DC overall infrastructure, its setup, etc. Xray being the cause is probably not the case as test cases are usually simple entities.
I'm unsure whether...</p>
<ul>
<li>this problem is systematic</li>
<li>ou have ... | Update existing test cases blocked in xRay importer | csv|jira-xray | 0 | 57 | 1 | 72,911,983 | 72,911,983 | 0 | true | 2022-07-08T09:03:24.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update existing test cases blocked in xRay importer<p>I want to update the action, expected result, and description of existing Xray test cases with the xRay... |
72,913,286 | Deserialize json to bool from int<p>Is there a way to configure deserialization so that when i try to deserialize json with value "1" to be parsed as bool value for an object.</p>
<p>Example class:</p>
<pre><code>public class Values
{
public bool BoolValue { get; set; }
}
</code></pre>
<p>and the json str... | <p>You can create a custom converter</p>
<pre><code>public class BoolConverter : JsonConverter<bool>
{
public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) =>
reader.TokenType switch
{
JsonTokenType.True => true,
JsonTokenType.Fa... | Deserialize json to bool from int | c#|asp.net-core | 0 | 57 | 1 | 72,913,811 | 72,913,811 | 0 | true | 2022-07-08T14:55:43.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deserialize json to bool from int<p>Is there a way to configure deserialization so that when i try to deserialize json with value "1" to be parsed ... |
72,904,978 | How to make that if includeChildren is false to be able to check each single individual toggle of the include1 array of toggles?<p>The problem is in the loop when i set the includeChildren bool to false again i can't then select individual toggles from the include1 array because includeChildren set the include1[i] to f... | <p>Your main issue is in your <code>if</code> part. What are you doing right now - you are syncing (<code>OnGUI</code> is called several times per frame) every bool array element with the "global" value many times per second. That's why you cannot change any of the elements individually.</p>
<p>What you need ... | How to make that if includeChildren is false to be able to check each single individual toggle of the include1 array of toggles? | c#|unity3d | 0 | 57 | 1 | 72,915,598 | 72,915,598 | 0 | true | 2022-07-07T22:47:27.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make that if includeChildren is false to be able to check each single individual toggle of the include1 array of toggles?<p>The problem is in the loop... |
72,922,483 | How to separate two images in the same row?<p>do you know how to separate two images in the same row?
Thank you so much for your help.
I will post the image under this sentence.</p>
<p><a href="https://i.stack.imgur.com/d0xcF.jpg" rel="nofollow noreferrer">Image</a></p>
<pre><code><div id="portfolio">
... | <p>I solved the problem, I increased w of the container from 75 to 80, but I needed to add a new class in CSS (that would be w-80).</p> | How to separate two images in the same row? | javascript|html|css|image|twitter-bootstrap | 0 | 57 | 2 | 72,922,631 | 72,922,631 | 0 | true | 2022-07-09T15:08:12.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to separate two images in the same row?<p>do you know how to separate two images in the same row?
Thank you so much for your help.
I will post the image ... |
72,924,762 | In ruby on rails How to allow users to Create a post only Sunday(one day) rest of the weekday make create post not allow<p>we have 7 days in a week but users allow to create a post on only one day which is Sunday,
how can I achieve that. pls need help i am new to rails</p>
<p>in teams/controller</p>
<pre><code>class Te... | <p>You can use plain Ruby to check the current date/time, and halt the request if it's not Sunday. For example, you can use the <a href="https://ruby-doc.org/core-3.1.1/Time.html#method-i-sunday-3F" rel="nofollow noreferrer"><code>Time#sunday?</code></a> method:</p>
<pre class="lang-rb prettyprint-override"><code>requi... | In ruby on rails How to allow users to Create a post only Sunday(one day) rest of the weekday make create post not allow | ruby-on-rails|ruby|ruby-on-rails-4 | -3 | 57 | 1 | 72,924,877 | 72,924,877 | 0 | true | 2022-07-09T21:31:12.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In ruby on rails How to allow users to Create a post only Sunday(one day) rest of the weekday make create post not allow<p>we have 7 days in a week but users... |
72,930,156 | (node:8604) DeprecationWarning: The message event is deprecated. Use messageCreate instead (Use `node --trace-deprecation ...`<p>I have been trying to make a discord bot and every time, my bot sends something in the chat, I get this error written in the title in the console.</p>
<p>My code:</p>
<pre class="lang-js pret... | <p>You should listen to the <a href="https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-messageCreate" rel="nofollow noreferrer"><code>messageCreate</code></a> event instead of the <a href="https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-message" rel="nofollow noreferrer"><code>message<... | (node:8604) DeprecationWarning: The message event is deprecated. Use messageCreate instead (Use `node --trace-deprecation ...` | javascript|node.js|discord.js | -1 | 57 | 1 | 72,930,245 | 72,930,245 | 0 | true | 2022-07-10T16:36:15.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
(node:8604) DeprecationWarning: The message event is deprecated. Use messageCreate instead (Use `node --trace-deprecation ...`<p>I have been trying to make a... |
72,929,400 | How to fix this failing recursion? (Python, recursion, nested lists)<p><strong>CLARIFICATIONS:</strong>
Adding some clarification based on the questions asked:
The bigger process - my user watches a video, and hits a keyboard key as the video plays. Every time they hit the keyboard, the timestamp (in milliseconds) of t... | <p>IIUC:</p>
<p><strong>Code</strong></p>
<pre><code>def break_lists(orig_list, trial_length, trials_num):
result = [[] for _ in range(trials_num)] # Create ranges
for v in orig_list:
bin_ = int(v/(trial_length*1000)) # find bin
if bin_*trial_length*1000 == v:
bin_ -= 1 ... | How to fix this failing recursion? (Python, recursion, nested lists) | python|recursion|nested-lists | -1 | 57 | 1 | 72,930,420 | 72,930,420 | 0 | true | 2022-07-10T14:52:14.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix this failing recursion? (Python, recursion, nested lists)<p><strong>CLARIFICATIONS:</strong>
Adding some clarification based on the questions aske... |
72,915,483 | Calculate block/share difficulty<h1>Introduction</h1>
<p>I am trying to obtain the share difficulty sent from my mining rig to the pool; I have captured the following stratum data:</p>
<p>Work from pool sent to miner:</p>
<pre><code>{"id":0,"jsonrpc":"2.0","result":["0xbafb9... | <p>After 2 days of reading and investigating, I made the code work.
The main issue is that there is no clear documentation on how to use <strong>ethereumjs</strong></p>
<pre><code>ethash.run(val, nonce, fullSize?)
mkcache(cacheSize, seed)
</code></pre>
<p><strong>fullSize</strong> corresponds to <code>get_cachesize</co... | Calculate block/share difficulty | ethereum|share|block | 0 | 57 | 1 | 72,931,965 | 72,931,965 | 0 | true | 2022-07-08T18:18:59.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate block/share difficulty<h1>Introduction</h1>
<p>I am trying to obtain the share difficulty sent from my mining rig to the pool; I have captured the ... |
72,933,037 | Elements going outside of grid layout<p>The form has a fixed width of 300px with a grid layout. I have made it two columns by</p>
<p><code>grid-template-columns: repeat(2, 1fr)</code> , and I have also tried <code>grid-template-columns: auto auto</code> , but the elements are still going outside of the form.</p>
<p>How... | <p><code>1fr</code> means <code>minmax(auto, 1fr)</code> which is a well-known concern <a href="https://github.com/w3c/csswg-drafts/issues/1777" rel="nofollow noreferrer">here</a>. In your context, <code>auto</code> is not obvious, and that causes unexpected widths for your input fields.</p>
<p>To fix it, you should se... | Elements going outside of grid layout | css | 1 | 57 | 2 | 72,933,221 | 72,933,221 | 0 | true | 2022-07-11T01:54:20.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Elements going outside of grid layout<p>The form has a fixed width of 300px with a grid layout. I have made it two columns by</p>
<p><code>grid-template-colu... |
72,929,686 | JSON contents answered from an API returns null (with Spring boot)<p>I'm learning to consume API with Spring boot and faced the following problem:</p>
<p>The URL "http://servicebus2.caixa.gov.br/portaldeloterias/api/home/ultimos-resultados" returns a JSON with the last results from Brazil's Lottery.</p>
<p>Wh... | <p>It seems that the link you posted is not active anymore <code>"http://servicebus2.caixa.gov.br/portaldeloterias/api/home/ultimos-resultados"</code></p>
<p>on chrome it sends a redirection to it's https endpoint:
<a href="https://i.stack.imgur.com/oBULp.png" rel="nofollow noreferrer"><img src="https://i.sta... | JSON contents answered from an API returns null (with Spring boot) | java|spring|spring-boot | 0 | 57 | 1 | 72,933,855 | 72,933,855 | 0 | true | 2022-07-10T15:31:35.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JSON contents answered from an API returns null (with Spring boot)<p>I'm learning to consume API with Spring boot and faced the following problem:</p>
<p>The... |
72,937,201 | Download excel file with jqgrid complete data using jquery<p>I basically need complete data from JQGrid and populate to excel file.</p>
<pre><code> <input type="button" id="download" value="DOWNLOAD" />
</code></pre>
<p>controller , how to write <code>GetData();</code> method which h... | <p><code>pcmdata</code> contain array of data</p>
<pre><code> public DataTable GetData() {
DataTable dt = new DataTable();
var pcmData = object_ProductCategaryMapping.ProductCategaryMappingGet();
dt.Columns.Add("Product Priority");
dt.Columns.Add("Product C... | Download excel file with jqgrid complete data using jquery | jquery|jqgrid | 0 | 57 | 1 | 72,938,186 | 72,938,186 | 0 | true | 2022-07-11T10:35:22.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Download excel file with jqgrid complete data using jquery<p>I basically need complete data from JQGrid and populate to excel file.</p>
<pre><code> <input... |
72,937,015 | EACCES error every time I try and do something with npm<p>Whenever I do anything related to npm, including uninstalling npm itself, I get this error:</p>
<pre><code>npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/bin/corepack
npm ERR! dest /usr/local/bin/.corepack-0KY6b4OJ
npm ERR! errno -13
npm E... | <p>Turns out it was an issue with my antivirus software! After disabling the software and installing NVM everything now works fine.</p> | EACCES error every time I try and do something with npm | node.js|npm | 0 | 57 | 2 | 72,941,271 | 72,941,271 | 0 | true | 2022-07-11T10:20:01.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
EACCES error every time I try and do something with npm<p>Whenever I do anything related to npm, including uninstalling npm itself, I get this error:</p>
<pr... |
72,941,379 | ! + enter, doesn't work, vs codeJune 2022 (version 1.69) update , HTML<p>After the new VS Code update, I'm not able to use ! + enter to do my base code automatically anymore. The onyl change was the new update and I also opened up a new Git repository and ignored the vs code folder. After that, I also can't use ! + ent... | <p>type html and then choose this</p>
<pre><code>html:5
</code></pre>
<p>and click enter this will create the code</p> | ! + enter, doesn't work, vs codeJune 2022 (version 1.69) update , HTML | html|visual-studio-code|shortcut | 0 | 57 | 2 | 72,941,531 | 72,941,531 | 0 | true | 2022-07-11T15:58:28.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
! + enter, doesn't work, vs codeJune 2022 (version 1.69) update , HTML<p>After the new VS Code update, I'm not able to use ! + enter to do my base code autom... |
72,946,240 | How to return a promise in sequelize QueryInterface?<p>I apologize if it is a naive question but I am new to sequelize and i am trying to talk to database using QueryInterface.</p>
<pre><code>module.exports = {
up: function (queryInterface, Sequelize) {
queryInterface.addIndex(
'entry',
['create_date'... | <p>You forgot the return statement. Try something like this:</p>
<pre class="lang-js prettyprint-override"><code>up: function (queryInterface, Sequelize) {
return Promise.all([
queryInterface.addIndex(
'entry',
['create_date', 'username'],
{
indexName: 'create_date_... | How to return a promise in sequelize QueryInterface? | node.js|sequelize.js | 0 | 57 | 2 | 72,946,401 | 72,946,401 | 0 | true | 2022-07-12T01:47:41.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to return a promise in sequelize QueryInterface?<p>I apologize if it is a naive question but I am new to sequelize and i am trying to talk to database us... |
72,947,842 | Animate Text in Tkinter Label Widget (python)<p>i want to animate a label text in tkinter (python). for that purpose, i am using time.sleep() method for updating 1 character in Label widget after a second but it is not updating Label widget instantly rather it is updating label at once at the end of timer. How could i ... | <p>It is not recommended to use loop and <code>time.sleep()</code> in the main thread of a tkinter application because it will block the tkinter <code>mainloop()</code> from updating widgets until the loop exits. That is why you can only see the result after the loop completes.</p>
<p>Use <code>.after()</code> instead:... | Animate Text in Tkinter Label Widget (python) | python|tkinter | 0 | 57 | 1 | 72,949,205 | 72,949,205 | 0 | true | 2022-07-12T06:21:00.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Animate Text in Tkinter Label Widget (python)<p>i want to animate a label text in tkinter (python). for that purpose, i am using time.sleep() method for upda... |
72,956,498 | Express/axios don't set cookies and headers for response<p>I have very complicated problem. My project has 2 API's. 1 API is for front-end of my application and 1 is for back-end. How it works, is just I send request from front-end API to back-end API.</p>
<p>Front-end API has URL <code>http://localhost:8080/api/</code... | <p>I have found not reason of the problem, but solution that seems to be ok. As I said, there are 2 API's - front-end and back-end.</p>
<p>From back-end API I get this cookie, but actually, it makes no sense to send it in header. Why? Because the front-end API will send it back on front.</p>
<p>So, using example above,... | Express/axios don't set cookies and headers for response | javascript|node.js|json|express|cookies | 2 | 57 | 1 | 72,956,828 | 72,956,828 | 0 | true | 2022-07-12T17:52:07.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Express/axios don't set cookies and headers for response<p>I have very complicated problem. My project has 2 API's. 1 API is for front-end of my application ... |
72,939,996 | Why expected `isize` in the procedural macro `u32_suffixed` error report?<p>I wrote such a macro with a test example like this:</p>
<pre class="lang-rs prettyprint-override"><code>#[selector]
pub enum Action {
A = "a()",
B = "b()",
}
</code></pre>
<p>The <code>selector</code> implementation:... | <p>The problem here has nothing to do with the fact that you're using a macro. The issue is that the macro generates code similar to this:</p>
<pre><code>enum Foo {
A = 0u32,
}
</code></pre>
<p><a href="https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=5579fe7f91866a680aa6d32a375... | Why expected `isize` in the procedural macro `u32_suffixed` error report? | rust | 0 | 57 | 1 | 72,961,847 | 72,961,847 | 0 | true | 2022-07-11T14:16:09.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why expected `isize` in the procedural macro `u32_suffixed` error report?<p>I wrote such a macro with a test example like this:</p>
<pre class="lang-rs prett... |
72,962,577 | I want to add the icon in the input field<p><a href="https://i.stack.imgur.com/fYKk8.png" rel="nofollow noreferrer">enter image description here</a>I want to add an icon on the right side input text field</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="sn... | <p>You will need to adapt this to your use case but this is the idea, please note that the container view is the container for the input, not the main container. To add it to the right you just need to switch them around.</p>
<pre><code><View style={styles.container}>
<FontAwesome
s... | I want to add the icon in the input field | react-native | -1 | 57 | 2 | 72,964,763 | 72,964,763 | 0 | true | 2022-07-13T07:40:27.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to add the icon in the input field<p><a href="https://i.stack.imgur.com/fYKk8.png" rel="nofollow noreferrer">enter image description here</a>I want to... |
72,970,657 | Angular url param is undefined<p>I am trying to get url parameter value but it is undefined and I don't find why...</p>
<p>Code</p>
<pre class="lang-js prettyprint-override"><code>export class HeaderComponent implements OnInit {
constructor(private route: ActivatedRoute) { }
ngOnInit(): void {
console.log(thi... | <p>What you are looking for is <code>queryParams</code> not <code>params</code>.</p>
<p><code>params</code> is for <code>myRoute/mySubRoute/:myParam:/</code></p>
<p><code>queryParams</code> is for <code>myRoute/mySubRoute?param=value</code> where <code>?param=value</code> is the <code>queryString</code>.</p> | Angular url param is undefined | angular|typescript|undefined|url-parameters | 0 | 57 | 2 | 72,970,751 | 72,970,751 | 0 | true | 2022-07-13T17:56:09.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular url param is undefined<p>I am trying to get url parameter value but it is undefined and I don't find why...</p>
<p>Code</p>
<pre class="lang-js prett... |
72,970,727 | Rails: How to use instance method in Active Record Query<p>I am having a filter query which should return all the records where either</p>
<ol>
<li>attribute (column) "status" is not "done", or</li>
<li>instance method "completeness_status" does not return "done"</li>
</ol>
<p>Th... | <p>You cannot use instance methods inside your query. But if you like to check the condition of completeness for only one row, then you can use it as instance method:</p>
<pre class="lang-rb prettyprint-override"><code>first_study = Study.first
first_study.completeness_status_done?
</code></pre>
<p>Also, if you provide... | Rails: How to use instance method in Active Record Query | sql|ruby-on-rails|activerecord|instance | 0 | 57 | 1 | 72,971,366 | 72,971,366 | 0 | true | 2022-07-13T18:02:16.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rails: How to use instance method in Active Record Query<p>I am having a filter query which should return all the records where either</p>
<ol>
<li>attribute... |
72,970,168 | visual representation of arrays с#<p><img src="https://i.stack.imgur.com/VoM4v.png" alt="visual representation of arrays" /></p>
<p>did I visualize 1D and 2D arrays correctly? if so, can you help with rendering a 3D and toothed array in this style?</p> | <p>Yes <code>c#</code> stores 2D arrays in row-major form (row by row). So the graphic looks correct.</p> | visual representation of arrays с# | c#|arrays | -4 | 57 | 1 | 72,971,571 | 72,971,571 | 0 | true | 2022-07-13T17:11:54.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
visual representation of arrays с#<p><img src="https://i.stack.imgur.com/VoM4v.png" alt="visual representation of arrays" /></p>
<p>did I visualize 1D and 2D... |
72,971,873 | HelmCharts - ConfigMap Template importing yaml files unformatted<p>I have a technical specific issue about Helm Chart.
I want to my ConfigMap template import yaml files in my files directory, these yaml files are Java SpringBoot configuration files from my applications, I'm able to import files but they are unformatted... | <p>This is not a problem at all. This is just the way in which Kubernetes handles a given stream of binary data. You will notice that all the <code>\n</code> and <code>\t</code> characters have been preserved in the data blob attached to the key <code>test.yaml</code> in your config map.</p>
<p>I say this is not a prob... | HelmCharts - ConfigMap Template importing yaml files unformatted | spring|kubernetes|kubernetes-helm|configmap | 0 | 57 | 1 | 72,972,344 | 72,972,344 | 0 | true | 2022-07-13T19:50:44.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HelmCharts - ConfigMap Template importing yaml files unformatted<p>I have a technical specific issue about Helm Chart.
I want to my ConfigMap template import... |
72,959,701 | Custom React classNames<p>I am struggling in trying to get my css to recognize the various css classes assigned to the const statuClass. Any help will be really appreciated. Below is my react code.</p>
<pre><code>import React from "react";
import classes from "./TestLetter.module.css";
const TestLe... | <p>Get rid of the module, just call the file: style.css and import it like this:
import './styles.css';</p>
<p>and use the code like this:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-o... | Custom React classNames | javascript|html|css|reactjs | -1 | 57 | 1 | 72,973,003 | 72,973,003 | 0 | true | 2022-07-13T00:36:08.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Custom React classNames<p>I am struggling in trying to get my css to recognize the various css classes assigned to the const statuClass. Any help will be rea... |
72,969,345 | Instead of update query , calling insert query in spring jpa<p>I am trying to update multiple table in spring jpa.
Consumer table update is happening perfectl but provider table is not able to update. Instead of it , its trying for insert which causes violation of primary key which is expected because it is trying for ... | <p>I got the issue.Actually in Provider class , I was annotating with wrong class. I have made the changes and now It's working fine :)</p>
<p>Here is the latest Provider entity class</p>
<pre><code>@Data
@Entity
@Table(name = "provider_table")
@IdClass(ProviderId.class)
public class Provider implements Seria... | Instead of update query , calling insert query in spring jpa | java|spring|spring-boot|jpa | 0 | 57 | 3 | 72,976,108 | 72,976,108 | 0 | true | 2022-07-13T16:04:10.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Instead of update query , calling insert query in spring jpa<p>I am trying to update multiple table in spring jpa.
Consumer table update is happening perfect... |
72,984,324 | How can I stack <div> elements with text content without shifting the text-content?<p>I want to stack one or more <code><div></code> elements on top of another <code><div></code> element, where both have text content.</p>
<p>I have created a fiddle here illustrating my issue:
<a href="https://jsfiddle.net/r... | <p>Just added <code>position: relative</code> to <code>.cell</code> and <code>position: absolute</code> with left and top 0 values to <code>.cell .letterCell</code>.</p>
<p>Hope this fiddle solves your problem:
<a href="https://jsfiddle.net/furkanmutlu/hbgxafeu/" rel="nofollow noreferrer">https://jsfiddle.net/furkanmut... | How can I stack <div> elements with text content without shifting the text-content? | javascript|html|css | 0 | 57 | 1 | 72,988,041 | 72,988,041 | 0 | true | 2022-07-14T17:13:50.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I stack <div> elements with text content without shifting the text-content?<p>I want to stack one or more <code><div></code> elements on top of... |
72,978,628 | BigQuery: iterating groups within a window of 28days before a start_date column using _TABLE_SUFFIX<p>I got a table like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>group_id</th>
<th>start_date</th>
<th>end_date</th>
</tr>
</thead>
<tbody>
<tr>
<td>19335</td>
<td>20220613</td>
<td... | <p>I can think of 2 approaches.</p>
<ol>
<li>Join all the tables and then perform your query.</li>
<li>Create dynamic queries for each of your users.</li>
</ol>
<p>Both approaches will require <strong>search_from</strong> and <strong>search_to</strong> to be available beforehand i.e you need to calculate each user's se... | BigQuery: iterating groups within a window of 28days before a start_date column using _TABLE_SUFFIX | sql|google-bigquery|data-partitioning | 0 | 57 | 1 | 72,993,019 | 72,993,019 | 0 | true | 2022-07-14T09:55:20.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BigQuery: iterating groups within a window of 28days before a start_date column using _TABLE_SUFFIX<p>I got a table like this:</p>
<div class="s-table-contai... |
72,994,933 | JSON selector for jq<p>I would like to get a CSV file from the <a href="https://raw.githubusercontent.com/common-voice/cv-dataset/main/datasets/cv-corpus-10.0-2022-07-04.json" rel="nofollow noreferrer">Mozilla CommonVoice JSON statistics</a>. It looks like this:</p>
<pre class="lang-json prettyprint-override"><code>{
... | <p>This works for me:</p>
<pre class="lang-bash prettyprint-override"><code>cat cv-corpus-10.0-2022-07-04.json| jq -r '.locales | keys[] as $k | "\($k),\(.[$k] | .validHrs)"'
</code></pre>
<p>The output looks like:</p>
<pre><code>ab,59.71
ar,87.747
as,2.14
ast,0
az,0.12
ba,256.46
bas,2.04
be,1089.38
bg,9.15
b... | JSON selector for jq | json|jq|export-to-csv | 0 | 57 | 2 | 72,995,151 | 72,995,151 | 0 | true | 2022-07-15T13:40:20.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JSON selector for jq<p>I would like to get a CSV file from the <a href="https://raw.githubusercontent.com/common-voice/cv-dataset/main/datasets/cv-corpus-10.... |
72,986,345 | How to get object name when it contains DOTs, CURLY BRACES and HASHTAGs on JSONPath?<p>I have the following JSON structure, generated by Zabbix Discovery key, with the following data:</p>
<pre><code>[{
"{#SERVICE.NAME}": ".WindowsService1",
"{#SERVICE.DISPLAYNAME}": ".WindowsS... | <p>$.[?(@['{#SERVICE.NAME}'] == '.WindowsService1')]</p> | How to get object name when it contains DOTs, CURLY BRACES and HASHTAGs on JSONPath? | json|regex|jsonpath|zabbix | -1 | 57 | 1 | 72,996,374 | 72,996,374 | 0 | true | 2022-07-14T20:31:47.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get object name when it contains DOTs, CURLY BRACES and HASHTAGs on JSONPath?<p>I have the following JSON structure, generated by Zabbix Discovery key... |
72,985,935 | How to run Machine Learning algorithms in GPU<p>I have used backward elimination algorithm to reduce features. But the point is with large amount of features and samples, it run on CPU and pretty slow.</p>
<p>How could i run it multithreading on GPU like i train Deep Learning. This is my code</p>
<pre><code>import pand... | <p>Have you considered using <a href="https://jax.readthedocs.io/en/latest/index.html" rel="nofollow noreferrer">JAX</a>? You can easily use numpy routines (written in jax) to offload your calculations to GPU (or any opther device like TPU). Here's an example of basic linear regression in JAX:</p>
<pre class="lang-py p... | How to run Machine Learning algorithms in GPU | python|machine-learning|time|process|gpu | 0 | 57 | 1 | 72,996,972 | 72,996,972 | 0 | true | 2022-07-14T19:49:29.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to run Machine Learning algorithms in GPU<p>I have used backward elimination algorithm to reduce features. But the point is with large amount of features... |
72,995,991 | adding extra dimensions in a numpy array or a dataframe<p>I have a pandas series named obs(62824,) that has values of temperatures as follows</p>
<pre><code>0 16.9
1 11.0
2 5.9
3 9.4
4 15.4
...
</code></pre>
<p>I want to use the following code to basically transform my nump... | <p>You are correct about adding dimensions to <code>obs</code>.</p>
<p>In <a href="https://docs.xarray.dev/en/stable/user-guide/data-structures.html#creating-a-dataarray" rel="nofollow noreferrer">Creating a DataArray</a> and <a href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" r... | adding extra dimensions in a numpy array or a dataframe | python|dataframe|numpy|python-xarray | 2 | 57 | 1 | 72,997,827 | 72,997,827 | 0 | true | 2022-07-15T15:04:00.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
adding extra dimensions in a numpy array or a dataframe<p>I have a pandas series named obs(62824,) that has values of temperatures as follows</p>
<pre><code>... |
72,993,867 | How to call zoho invoice rest api after access and refresh token?<p>I am following the steps mentioned in
<a href="https://www.zoho.com/invoice/api/v3/oauth/#overview" rel="nofollow noreferrer">https://www.zoho.com/invoice/api/v3/oauth/#overview</a>
able to get access token and refresh token.</p>
<p>and not clear what ... | <p>Zoho's documentation has an example call to list invoices :
<a href="https://www.zoho.com/invoice/api/v3/invoices/#list-invoices" rel="nofollow noreferrer">https://www.zoho.com/invoice/api/v3/invoices/#list-invoices</a></p>
<pre><code>curl https://invoice.zoho.com/api/v3/invoices
-H "X-com-zoho-invoice-organiza... | How to call zoho invoice rest api after access and refresh token? | oauth|token|access-token|refresh-token|zoho | 0 | 57 | 1 | 72,998,207 | 72,998,207 | 0 | true | 2022-07-15T12:15:56.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to call zoho invoice rest api after access and refresh token?<p>I am following the steps mentioned in
<a href="https://www.zoho.com/invoice/api/v3/oauth/... |
72,998,115 | CSS: Text in a button is not centered<p>My text in the button is not centered.
I feel that this happens all the time.
The text always seems to be a bit under the center.
I tried to open the code with Chrome and Edge. They look the same.
Here's a photo of the button</p>
<p><div class="snippet" data-lang="js" data-hide="... | <p>You are trying to position an element using hard coded padding values. My advice would be not to do that.</p>
<p>Remove the padding and change your x -> X. Then add these to your class</p>
<pre><code>.button {height: 15px; aspect-ratio: 1/1;}
</code></pre>
<p>Whatever you set the height to the width will follow. ... | CSS: Text in a button is not centered | html|css | 1 | 57 | 5 | 72,998,212 | 72,998,212 | 0 | true | 2022-07-15T18:08:32.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS: Text in a button is not centered<p>My text in the button is not centered.
I feel that this happens all the time.
The text always seems to be a bit under... |
72,988,241 | wait() hangs when CLONE_THREAD<p>I am tracing some processes and their children using ptrace. I am trying to print specific system call (using Seccomp filter that notifies ptrace, see <a href="https://www.alfonsobeato.net/c/filter-and-modify-system-calls-with-seccomp-and-ptrace/" rel="nofollow noreferrer">this blogpost... | <p>Your sample program has a bug: it may free the second thread’s stack before that thread exits, causing a SEGV. And your tracer just doesn’t handle signals well.</p>
<p>If the traced program gets a signal, your tracer intercepts it, not passing it down to the program. When it continues the program, it continues from ... | wait() hangs when CLONE_THREAD | c++|c|linux|ptrace|seccomp | 2 | 57 | 1 | 72,999,003 | 72,999,003 | 0 | true | 2022-07-15T01:40:05.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
wait() hangs when CLONE_THREAD<p>I am tracing some processes and their children using ptrace. I am trying to print specific system call (using Seccomp filter... |
73,001,154 | Jest unit test switch case with ternary operator<p>I have written test case for below switch case, but I'm not sure how to write the case with ternary operator</p>
<pre><code>export function getFormName(type, uppercase, t) {
switch (type) {
case "withdrawal":
return uppercase
? _.u... | <p>You don't need <code>async</code> for the callback function in your test cases. Please use the following 2 test cases as examples to test your <code>getFormName()</code> function.</p>
<pre><code>describe("utils/helpers", () => {
describe("getFormName()", () => {
it("should return... | Jest unit test switch case with ternary operator | javascript|reactjs|jestjs|switch-statement|conditional-operator | -1 | 57 | 1 | 73,001,364 | 73,001,364 | 0 | true | 2022-07-16T02:37:46.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jest unit test switch case with ternary operator<p>I have written test case for below switch case, but I'm not sure how to write the case with ternary operat... |
72,993,761 | Creating custom groovy template for email-ext plugin<p>I am trying to send files of XML and pdf formats using Jenkins emailext plugin running pipeline. I don't have much idea on groovy script. Hence, following the given reference
<a href="https://stackoverflow.com/questions/72138205/running-groovy-in-email-extension-pl... | <p>You can attach any file using <code>attachmentsPattern</code>. The file has to reside in the workspace for this to work. So I'm suspecting you may be having an issue with your pattern.</p>
<pre><code>emailext attachmentsPattern: '**/report.pdf', body: 'Find attachments', subject: 'test', to: 'test@me.org'
</code></p... | Creating custom groovy template for email-ext plugin | templates|jenkins|groovy|email-ext | 0 | 57 | 1 | 73,006,016 | 73,006,016 | 0 | true | 2022-07-15T12:07:53.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating custom groovy template for email-ext plugin<p>I am trying to send files of XML and pdf formats using Jenkins emailext plugin running pipeline. I don... |
73,009,411 | Incorrect table definition; there can be only one auto column<p>Migration File</p>
<pre><code>public function up()
{
Schema::create('progress', function (Blueprint $table) {
$table->id();
$table->foreignId('state_id')->constrained()->cascadeOnDelete();
$table->foreignId('city_... | <p>Your migration has defined the tiny integer column as an auto increment column. Take a look at the Laravel <a href="https://laravel.com/api/9.x/Illuminate/Database/Schema/Blueprint.html#method_tinyInteger" rel="nofollow noreferrer">tinyInterger</a> docs and you’ll see the second argument is a Boolean for defining th... | Incorrect table definition; there can be only one auto column | php|laravel | 0 | 57 | 1 | 73,009,477 | 73,009,477 | 0 | true | 2022-07-17T05:16:01.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Incorrect table definition; there can be only one auto column<p>Migration File</p>
<pre><code>public function up()
{
Schema::create('progress', function ... |
73,021,740 | getElementsByTagName() and text inside .click<p>I have clickable list elements, same class and role, and just text inside is different. I need to chose one and click same (text) li element all the time.
This function <code>document.getElementsByTagName("li")[5].click()</code> works, but sometimes index chang... | <p>You have to iterate through <em>li</em> and check content of each one</p>
<pre class="lang-js prettyprint-override"><code>for (element in document.getElementsByTagName("li")) {
if (element.textContent === '222') {
element.click();
break;
}
}
</code></pre>
<p><a href="https://www.w3schools.com/j... | getElementsByTagName() and text inside .click | javascript|get|click|html-lists|element | 0 | 57 | 1 | 73,022,182 | 73,022,182 | 0 | true | 2022-07-18T11:38:45.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
getElementsByTagName() and text inside .click<p>I have clickable list elements, same class and role, and just text inside is different. I need to chose one a... |
73,027,638 | Switch/case using logic operators such as >= and &&<p>I have this code that first reads which position of a checkbox is checked and then executes several ifs. Then I thought I could make the code smaller if I used switch/case, while also portfolio-ing the command for later uses. The command was like this:</p>
<pre><cod... | <p>You can use this "trick":</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const age = 14;
switch(true)
{
case age > 5 && age <= 10:
console.l... | Switch/case using logic operators such as >= and && | javascript|switch-statement|logical-operators | 0 | 57 | 2 | 73,027,683 | 73,027,683 | 0 | true | 2022-07-18T19:28:38.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Switch/case using logic operators such as >= and &&<p>I have this code that first reads which position of a checkbox is checked and then executes several ifs... |
73,030,368 | Django deploy on App Engine raise error: connection to server at "127.0.0.1", port 5432 failed:<p>i am trying to deploy my django web app on Google Cloud App Engine, but are running to a connection error. This is after I have done all the configuration like main.py, entry point, app.yaml.</p>
<p>After doing some diggin... | <p>According to this <a href="https://cloud.google.com/appengine/docs/standard/python3/testing-and-deploying-your-app#detecting_application_runtime_environment" rel="nofollow noreferrer">documentation</a>, to check if you're running in Production or not, you should be doing</p>
<pre><code>if os.getenv('GAE_ENV', '').st... | Django deploy on App Engine raise error: connection to server at "127.0.0.1", port 5432 failed: | python-3.x|django|google-app-engine|google-cloud-sql | 0 | 57 | 1 | 73,030,515 | 73,030,515 | 0 | true | 2022-07-19T02:07:05.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django deploy on App Engine raise error: connection to server at "127.0.0.1", port 5432 failed:<p>i am trying to deploy my django web app on Google Cloud App... |
72,947,491 | Function to concat undefinded number of dataframes<p>I'd like to create a function where I can input an undefined number of arrays, turn them into data frames ,concatenate them appending their columns and output a merged dataframe.</p>
<p>Example:</p>
<pre><code># Suppose we have 3 arrays:
data1 = {
'A': ['A1', 'A... | <p>This is a short answer using list comprehension, provided by Ch3steR.
It works and is a very compact answer.</p>
<pre><code>def func(*args): d = [pd.DataFrame(dc) for dc in args]; return pd.concat(d, axis=1)
</code></pre>
<p>In the end I went for a longer and slower solution, but that i will easily understand when l... | Function to concat undefinded number of dataframes | python|pandas|function|arguments|concatenation | 0 | 57 | 1 | 73,054,510 | 73,054,510 | 0 | true | 2022-07-12T05:39:40.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Function to concat undefinded number of dataframes<p>I'd like to create a function where I can input an undefined number of arrays, turn them into data frame... |
72,990,606 | Is it possible to somehow edit product option names via Shopify REST API (2022-07)?<p>I tried to do it like this:</p>
<pre><code>$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, testurl.'products/4383793250431.json');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CU... | <p>It turns out that the error was referring to the 2nd product option, which is not mentioned in the request.
As you can see in the screenshot, the product has the "Size" option, it must also be passed in the request, otherwise the API tries to remove this option.
The correct request looks like this:</p>
<pr... | Is it possible to somehow edit product option names via Shopify REST API (2022-07)? | shopify|shopify-app|shopify-api | 0 | 57 | 1 | 73,062,387 | 73,062,387 | 0 | true | 2022-07-15T07:41:40.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to somehow edit product option names via Shopify REST API (2022-07)?<p>I tried to do it like this:</p>
<pre><code>$ch = curl_init();
curl_set... |
72,974,906 | Accessing AWS service from a program calling aws cli<p>Running EC2 instance that has an IAM role attached that allows to copy/read files to/from an S3 bucket.</p>
<p>When logged into the EC2 instance (via ssh) I can perform all those tasks using <code>aws s3 ...</code> command. There are no credentials because it's usi... | <p>OK, assuming you have a role (lets call it EC2S3AccessRole) that allows ec2 instance access to s3 bucket(s), you need to follow this doc: <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instan... | Accessing AWS service from a program calling aws cli | linux|go|amazon-ec2|aws-cli | 2 | 57 | 1 | 73,127,133 | 73,127,133 | 0 | true | 2022-07-14T03:36:01.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Accessing AWS service from a program calling aws cli<p>Running EC2 instance that has an IAM role attached that allows to copy/read files to/from an S3 bucket... |
72,977,297 | Type bound for a function with return lifetime<p>Consider the function</p>
<pre><code>fn f(v: &[usize]) -> impl Iterator<Item = usize> + '_ {
v.iter().cloned()
}
</code></pre>
<p>I want to write a generic function <code>g</code> which accepts any function with the same signature as <code>f</code>, and ... | <p>Based on <a href="https://www.reddit.com/r/rust/comments/jpg0pp/defining_a_fn_bound_with_generic_return_type_that/" rel="nofollow noreferrer">this post</a>, I found a solution for the original interface (without a <code>Box</code>) using a helper trait:</p>
<pre><code>fn f(v: &[usize]) -> impl Iterator<Ite... | Type bound for a function with return lifetime | rust | 3 | 57 | 2 | 73,144,919 | 73,144,919 | 0 | true | 2022-07-14T08:12:49.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Type bound for a function with return lifetime<p>Consider the function</p>
<pre><code>fn f(v: &[usize]) -> impl Iterator<Item = usize> + '_ {
... |
72,915,433 | Trying to detect cycle in graph using BFS but some test cases not passing<p>The first function isCycle is getting parameters from driver code of website. I have worked for more than 2 hours in order to debug why its not working in my logic. Anything i need to improve here.
This is the link of question.
<a href="https:/... | <p>Well, assuming our goal is not to find optimal solution, but to solve problem using BFS...</p>
<p>Next code snippet:</p>
<pre class="lang-java prettyprint-override"><code> Queue<Integer> q = new LinkedList<>();
q.add(0);
isVisited.put(0,true);
parentChild.put(0,-1);
</code>... | Trying to detect cycle in graph using BFS but some test cases not passing | java|algorithm|data-structures|graph|breadth-first-search | -3 | 57 | 1 | 72,919,899 | 72,919,899 | 0 | true | 2022-07-08T18:14:00.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to detect cycle in graph using BFS but some test cases not passing<p>The first function isCycle is getting parameters from driver code of website. I h... |
72,909,110 | please help me with solving this ruby sum<p>You have been given 3 integers - N1, N2 and N3. Find how many numbers between N1 and N2 (both inclusive) are divisible by N3. Print these numbers and count. how to find it</p> | <p>Input</p>
<pre><code>N1 = 1
N2 = 100
N3 = 3
</code></pre>
<p>Let's create the array now</p>
<pre><code>a = [*N1..N2]
#=>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51... | please help me with solving this ruby sum | ruby | -3 | 57 | 1 | 72,909,279 | 72,909,279 | 0 | true | 2022-07-08T09:05:43.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
please help me with solving this ruby sum<p>You have been given 3 integers - N1, N2 and N3. Find how many numbers between N1 and N2 (both inclusive) are divi... |
72,983,654 | C# - Toast Notifications expire time extend<p>It displays after 20 seconds but disappears after about 7 seconds, how to extend the expire time?</p>
<p>code :</p>
<pre><code> new ToastContentBuilder()
.AddArgument("action", "viewConversation")
.AddArgu... | <p>I am assuming that you are using Microsoft.Toolkit.Uwp.Notifications.
If we look in the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.toolkit.uwp.notifications.toastcontentbuilder.settoastduration?view=win-comm-toolkit-dotnet-7.0" rel="nofollow noreferrer">documentation</a> there is a method:</p>
<b... | C# - Toast Notifications expire time extend | c# | 0 | 57 | 1 | 72,984,058 | 72,984,058 | 0 | true | 2022-07-14T16:15:09.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# - Toast Notifications expire time extend<p>It displays after 20 seconds but disappears after about 7 seconds, how to extend the expire time?</p>
<p>code :... |
73,008,353 | How to deserialize and use property of JSON Nested Arrays<p>I'm making a <strong>C#</strong> project on Unity based on the card game Yu-Gi-Oh . I'm using this API: <a href="https://db.ygoprodeck.com/api-guide/" rel="nofollow noreferrer">https://db.ygoprodeck.com/api-guide/</a></p>
<p>The API give access to all the card... | <p>a professional would be using Linq</p>
<pre><code>using System.Linq;
List<CardInfo> cardInfoList = cards.data.Select(d => new CardInfo
{
id = d.id,
name = d.name,
image_url = d.card_images.Select(d => d.image_url).ToList()
}).ToList();
foreach(CardInfo card in cardIn... | How to deserialize and use property of JSON Nested Arrays | c#|json|unity3d | 1 | 57 | 1 | 73,008,652 | 73,008,652 | 0 | true | 2022-07-16T23:45:52.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to deserialize and use property of JSON Nested Arrays<p>I'm making a <strong>C#</strong> project on Unity based on the card game Yu-Gi-Oh . I'm using thi... |
72,827,538 | Textfield remains focused after keyboard is dismissed?<p>In my case i have used textfield for searching , when user click on it keyboard appears and when the user press back button the keyboard is dissapeared but the textfield remains focused . And when user open the drawer and close it the keyboard appears automatical... | <pre><code>keyboardSubscription = keyboardVisibilityController.onChange.listen((bool visible) {
if (!visible) {
FocusManager.instance.primaryFocus?.unfocus();
}
});
</code></pre> | Textfield remains focused after keyboard is dismissed? | flutter|dart | 0 | 57 | 4 | 72,828,335 | 72,828,335 | 0 | true | 2022-07-01T09:57:35.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Textfield remains focused after keyboard is dismissed?<p>In my case i have used textfield for searching , when user click on it keyboard appears and when the... |
72,856,187 | I want to print the data as a list when the QR Code is scanned<p>There will be a special qr code and there will be sequential information in this qr code.Can I print the information in the incoming qr code on the bottom line when it sees a space or a symbol(@)?</p>
<p><a href="https://www.hizliresim.com/qc4feyi" rel="n... | <p>Use <code>\n</code> for new line</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>alert("Color@100@42@1$".replace(/@/g, "@\n"))</code></pre>
</div>
</div>
</p>
<p>After edit<... | I want to print the data as a list when the QR Code is scanned | javascript|xcode|react-native|mobile|qr-code | 0 | 57 | 1 | 72,856,293 | 72,856,293 | 0 | true | 2022-07-04T11:46:20.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to print the data as a list when the QR Code is scanned<p>There will be a special qr code and there will be sequential information in this qr code.Can... |
72,946,505 | Nu HTML Checker show "Possible misuse of aria-label." for the special structure<p>I designed some special structure for the project effect and set the <code>aria-label</code> attribute on the tag. But Nu HTML Checker tells me that <strong>"Possible misuse of <code>aria-label</code>. "</strong></p>
<pre><code>... | <p><strong>h1-h6 are accessible by default</strong>, thats why the <code>aria-label</code> attribute is marked as "possible misuse".</p>
<p>If you want to show text only to screen readers, try this solution: <a href="https://css-tricks.com/inclusively-hidden/" rel="nofollow noreferrer">https://css-tricks.com/... | Nu HTML Checker show "Possible misuse of aria-label." for the special structure | html|svg|accessibility|wai-aria | 1 | 57 | 1 | 72,949,430 | 72,949,430 | 0 | true | 2022-07-12T02:44:03.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nu HTML Checker show "Possible misuse of aria-label." for the special structure<p>I designed some special structure for the project effect and set the <code>... |
72,936,848 | How do you add GIFs to html?<p>How do i add GIFs to html? I'm currently learning html, and i want to know how to add a GIF to my websites. Does anyone know how to do that?</p> | <p>It depends.</p>
<p>GIF is an outdated format, terribly wasteful and resource hungry for the animations we know as “GIFs“. The term GIF is also used for the content pattern of short, autoplaying, silent videos that run in a loop.</p>
<p>If you checkout big websites with GIFs like Giphy, 9Gag or Twitter, they are actu... | How do you add GIFs to html? | html | 0 | 57 | 3 | 72,937,237 | 72,937,237 | 0 | true | 2022-07-11T10:08:24.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you add GIFs to html?<p>How do i add GIFs to html? I'm currently learning html, and i want to know how to add a GIF to my websites. Does anyone know h... |
72,850,120 | Keras - Specifying from_logits=False when using tf.keras.layers.Dense(1,activation='sigmoid')(x)<p>I am working on a binary classification problem, using transfer learning and image inputs and have a question regarding the</p>
<p>I have been working through using the correct activation layers (e.g. Softmax or Sigmoid -... | <blockquote>
<p>This means when I am obtaining predictions, I don't use the tf.nn.sigmoid() function and instead simply check if the value is greater than 0.5, then 1, else 0. Is this correct?</p>
</blockquote>
<p>Yes, you don't even need the <code>from_logits</code> parameter since you're using the <code>sigmoid</code... | Keras - Specifying from_logits=False when using tf.keras.layers.Dense(1,activation='sigmoid')(x) | python|tensorflow|machine-learning|keras|deep-learning | 0 | 57 | 1 | 72,851,698 | 72,851,698 | 0 | true | 2022-07-03T21:42:54.390Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Keras - Specifying from_logits=False when using tf.keras.layers.Dense(1,activation='sigmoid')(x)<p>I am working on a binary classification problem, using tra... |
72,983,794 | resizing an existing array using `realloc`<p>I defined an array and I tried to resize using <code>realloc()</code> but it is not working. My question is can I do that using <code>arr[]</code> or do I have to use <code>calloc()</code> or <code>malloc()</code> first to define the array and then use <code>realloc()</code>... | <p>For starters it seems you mean</p>
<pre><code>int newSize = ++size;
</code></pre>
<p>instead of</p>
<pre><code>int newSize = size++;
</code></pre>
<p>as <strong>Craig Estey</strong> pointed in its comment.</p>
<p>This array</p>
<pre><code>int arr[] = {1, 2, 3};
</code></pre>
<p>has automatic storage duration.</p>
<p... | resizing an existing array using `realloc` | c|malloc|realloc|calloc | 0 | 57 | 1 | 72,983,958 | 72,983,958 | 0 | true | 2022-07-14T16:28:22.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
resizing an existing array using `realloc`<p>I defined an array and I tried to resize using <code>realloc()</code> but it is not working. My question is can ... |
72,853,771 | Antd Carousel transferring from class component into functional<p>I have following <a href="https://codesandbox.io/s/antd-carousel-gallery-forked-jgw35s?file=/index.js" rel="nofollow noreferrer">code</a></p>
<pre><code> class Gallery extends Component {
state = {
media: null,
nav: null
};
... | <p>I have updated the on <a href="https://codesandbox.io/s/antd-carousel-gallery-forked-25eqvl?file=/index.js" rel="nofollow noreferrer">this link</a> , or also you can see the below code</p>
<pre><code>import React, { Component, useState } from "react";
import ReactDOM from "react-dom";
import &quo... | Antd Carousel transferring from class component into functional | reactjs|react-functional-component | 2 | 57 | 1 | 72,853,897 | 72,853,897 | 0 | true | 2022-07-04T08:28:01.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Antd Carousel transferring from class component into functional<p>I have following <a href="https://codesandbox.io/s/antd-carousel-gallery-forked-jgw35s?file... |
72,929,938 | How to remove ripple effect on clicking raised button flutter?<p>I have this dialog box and i have a question:</p>
<p>that when i click the close button, its giving this ripple effect which i dont want. I just want to pop the dialog box on pressed. This is the code</p>
<pre><code>
// Child 3 : Close Button
Pa... | <p>You can use <code>GestureDetector</code> that wont provide an extra ui decoration</p>
<pre class="lang-dart prettyprint-override"><code>GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: const Icon(
Icons.close,
color: Colors.black,
),
),
</code></pre>
<p>Also you can use <code>E... | How to remove ripple effect on clicking raised button flutter? | flutter | 0 | 57 | 1 | 72,930,110 | 72,930,110 | 0 | true | 2022-07-10T16:08:08.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove ripple effect on clicking raised button flutter?<p>I have this dialog box and i have a question:</p>
<p>that when i click the close button, its... |
72,843,678 | Cant make comparison between two values as total 1 is corrupted and become total 2 value<p>i have a problem. my total1 and total2 cant make comparison. my program will show that player 2 wins even player 1 score higher. so when i cout total1 and total2, it shows that total 1 value is corrupted and become total2 value a... | <p>So essentially your code is this</p>
<pre><code>for (int i = 1 ; i <= count; ++i)
{
...
float total1 = 0, total2 = 0;
total1 = ...;
total2 = ...;
if (i == 1 || i == 3 || i == 5 || i == 7 || i == 9)
cout << endl << "Your mark for this round is " << total1;
... | Cant make comparison between two values as total 1 is corrupted and become total 2 value | c++ | 1 | 57 | 1 | 72,844,511 | 72,844,511 | 0 | true | 2022-07-03T03:06:01.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cant make comparison between two values as total 1 is corrupted and become total 2 value<p>i have a problem. my total1 and total2 cant make comparison. my pr... |
72,818,083 | How Can I Make a Container stay in position no matter the size of the screen in flutter<p>I've got a really cool design where I have a green container hidden behind the first line of containers in my grid. I used media query to give the container a height so it appears halfway behind the top white containers. The probl... | <p>Instead of using a percentage I would use a constant value. I assume you want to have the green area stop somewhere in the middle of the first tiles in the grid? You could make the sum of those paddings (I think that's 20 + 50 + 10 + half of a tile height) and use that as the <code>Container</code>'s height.</p>
<p>... | How Can I Make a Container stay in position no matter the size of the screen in flutter | flutter|dart|flutter-layout|flutter-web | 0 | 57 | 1 | 72,818,216 | 72,818,216 | 0 | true | 2022-06-30T15:05:35.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How Can I Make a Container stay in position no matter the size of the screen in flutter<p>I've got a really cool design where I have a green container hidden... |
72,773,524 | Is there an easy way to retrieve all subclass instances of a base class from NestJS DI container?<p>This is similar to the question asked here, but it does not have a clear answer:</p>
<p><a href="https://stackoverflow.com/questions/65299721/get-all-instances-of-a-paritcular-kind-of-nestjs-service">Get all instances of... | <p>This is possible with <code>DiscoveryService</code>, as described here:</p>
<p><a href="https://github.com/nestjs/nest/issues/9866#issuecomment-1174689723" rel="nofollow noreferrer">https://github.com/nestjs/nest/issues/9866#issuecomment-1174689723</a></p>
<p>Here is an example for my use case.</p>
<pre class="lang-... | Is there an easy way to retrieve all subclass instances of a base class from NestJS DI container? | nestjs | 1 | 57 | 2 | 72,869,743 | 72,869,743 | 0 | true | 2022-06-27T14:11:12.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there an easy way to retrieve all subclass instances of a base class from NestJS DI container?<p>This is similar to the question asked here, but it does n... |
72,945,849 | How to query Pandas df based on row values and column header with Python<p>Is there a way to query the df based on the row values and column header? Looking to pass through <code>Disney</code>, <code>World</code>, and <code>Value</code> as variables to return <code>55</code>. I tried using the <code>df.loc</code> funct... | <p>IIUC, you create a function, pass the parameters and get the value in return</p>
<pre><code>df=df.set_index(['Key1', 'Key2'])
def findval(df, Key1, Key2):
return df.loc[(Key1, Key2), 'Value']
findval(df, 'Disney', 'Land')
</code></pre>
<p>RESULT:</p>
<p>97</p>
<p>OR</p>
<pre><code>def findval(df, Key1, Key2):
... | How to query Pandas df based on row values and column header with Python | python|python-3.x|pandas|dataframe | 0 | 57 | 4 | 72,945,985 | 72,945,985 | 0 | true | 2022-07-12T00:19:55.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to query Pandas df based on row values and column header with Python<p>Is there a way to query the df based on the row values and column header? Looking ... |
72,933,805 | How i can Cache httprequest (json returned) in angular Service?<p>How i can Cache httprequest (json returned) in angular Service?</p>
<p>I need sample code or project</p>
<p>I have only one api in the backend and only one get function The get function provides different outputs according to the inputs. Actually my get ... | <p>I've implemented a simple client cache that uses localStorage to store json data returned from services (Note: only 5MB of data can be stored!! Use other client storage method to store more data).</p>
<p>First you have to create an internal service to interact with <code>localStorage</code> for the <code>save</code>... | How i can Cache httprequest (json returned) in angular Service? | angular|caching|service|request|httprequest | 0 | 57 | 1 | 72,935,879 | 72,935,879 | 0 | true | 2022-07-11T04:42:17.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How i can Cache httprequest (json returned) in angular Service?<p>How i can Cache httprequest (json returned) in angular Service?</p>
<p>I need sample code o... |
72,772,306 | how to add comment to post by using id in asp.net mvc?<p>developer i am a beginner of asp.net mvc .I want to add comment to the post by using Post Id.
here is comment and post model
Post</p>
<pre><code>namespace Post.Models
{
public class Post
{
public int Id { get; set; }
public string Title { ... | <p>Creating a relationship between the objects should solve your issue. Like this you can add a comment to the database with the connected PostId and the framework will be able to fill the list of comments on the post object:</p>
<p>Post:</p>
<pre><code> public class Post
{
public int Id { get; set; }
... | how to add comment to post by using id in asp.net mvc? | c#|.net|asp.net-mvc | 0 | 57 | 1 | 72,772,428 | 72,772,428 | 0 | true | 2022-06-27T12:43:04.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to add comment to post by using id in asp.net mvc?<p>developer i am a beginner of asp.net mvc .I want to add comment to the post by using Post Id.
here i... |
72,871,273 | How to detect outliners from a list<p>I have a list with values. From this list I would like to get the outliners.</p>
<pre><code>list_of_values = [2, 3, 100, 5, 53, 5, 4, 7]
def detect_outlier(data):
threshold= 3
mean_1 = np.mean(data)
std_1 =np.std(data)
outliers = [y for y in data if (np.ab... | <p>Since std_1 = 33.413, any element in list_of_values divided by std_1 will be smaller than the threshold and hence not yielded.</p> | How to detect outliners from a list | python|std|mean|outliers | 1 | 57 | 1 | 72,871,442 | 72,871,442 | 0 | true | 2022-07-05T14:39:07.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to detect outliners from a list<p>I have a list with values. From this list I would like to get the outliners.</p>
<pre><code>list_of_values = [2, 3, 100... |
73,020,309 | I want the "YOU ENTERED LEVEL X" message to be displayed only once. Please read the full question to understand it better<p>I need help for this code. Let me tell what the problem is. For example, after running the program , if the score is 4, as soon as user scores 4, it will be printed Congratulations!! You entered l... | <p>The reason why your program outputs the string when the user fails, is because your program will check the score and print the string, regardless of whether the answer is correct or not.</p>
<p>In order to change this you must specify an exit condition in the case where the answer is wrong</p>
<pre><code>function as... | I want the "YOU ENTERED LEVEL X" message to be displayed only once. Please read the full question to understand it better | javascript|node.js|replit | 0 | 57 | 3 | 73,020,510 | 73,020,510 | 0 | true | 2022-07-18T09:48:30.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want the "YOU ENTERED LEVEL X" message to be displayed only once. Please read the full question to understand it better<p>I need help for this code. Let me... |
72,933,472 | ModuleNotFoundError in spacy version 3.3.1 tried previous mentioned solution not working<pre><code> import spacy
from spacy.lemmatizer import Lemmatizer
from spacy.lang.en import LEMMA_INDEX, LEMMA_EXC, LEMMA_RULES
lemmatizer = Lemmatizer(LEMMA_INDEX, LEMMA_EXC, LEMMA_RULES)
lemmatizer('chuckle... | <p>It looks like they've changed the way the lemmatizer is instantiated but the following should work...</p>
<pre><code>import spacy
nlp = spacy.load('en_core_web_sm', disable=['ner', 'tagger', 'parser', 'lemmatizer'])
lemmatizer = nlp.get_pipe('lemmatizer')
t = nlp('chuckles')[0]
t.pos_ = 'NOUN'
lemma = lemmatizer.l... | ModuleNotFoundError in spacy version 3.3.1 tried previous mentioned solution not working | python|nlp|chatbot|lemmatization|spacy-3 | 0 | 57 | 1 | 72,939,110 | 72,939,110 | 0 | true | 2022-07-11T03:41:29.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ModuleNotFoundError in spacy version 3.3.1 tried previous mentioned solution not working<pre><code> import spacy
from spacy.lemmatizer import Lemmatiz... |
72,864,234 | DocuSign API - How to override and skip the recipient authentication screen for specific envelope requests in embedded and remote signing via API?<p>In the DocuSign web application, under recipient authentication settings, I have selected the <code>Disable recipient authentication for this account</code> setting.</p>
<... | <p>I believe that embedded recipients ("captive" recipients) will not need to authenticate with DocuSign even if the <code>Any recipient must authenticate on every envelope sent from this account</code> setting is on. An exception to this would be accounts set up for 21 CFR Part 11 rules.</p>
<p>Best would be... | DocuSign API - How to override and skip the recipient authentication screen for specific envelope requests in embedded and remote signing via API? | docusignapi | 0 | 57 | 2 | 72,867,695 | 72,867,695 | 0 | true | 2022-07-05T05:05:46.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DocuSign API - How to override and skip the recipient authentication screen for specific envelope requests in embedded and remote signing via API?<p>In the D... |
72,950,044 | add html page on another html like ads<p>if I select more than 5 I want that another Html page will pop up like an ads to the user will unselect one of the 5 selected</p>
<pre><code>let counter = 0;
$('.switched').change(function () {
if ($(this).parent().parent().hasClass('clicked')) {
$(this)... | <p>Yes you can add it through bootstrap modal for example given at this link,</p>
<p><a href="https://getbootstrap.com/docs/4.1/components/modal/#vertically-centered" rel="nofollow noreferrer">https://getbootstrap.com/docs/4.1/components/modal/#vertically-centered</a></p>
<pre><code>$('#myModal').modal('toggle')
</code... | add html page on another html like ads | javascript|html|jquery|css | 0 | 57 | 2 | 72,950,126 | 72,950,126 | 0 | true | 2022-07-12T09:28:22.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
add html page on another html like ads<p>if I select more than 5 I want that another Html page will pop up like an ads to the user will unselect one of the 5... |
72,875,611 | Not able to do multiple && without bracket, and how to do in [[ .. ]] in bash script<p>I've tried to use "test" between if but still error is there.</p>
<p><strong>Taking user input:</strong></p>
<pre><code>echo -e "Enter first value: \c"
read -r a
echo -e "Enter second value: \c"
read -r... | <p><code>[</code> is a command. It is the same thing as <code>test</code> except that the last argument has to be <code>]</code>. Meanwhile, <code>&&</code> is bash syntax that separates two commands and says to only execute the second command if the first one succeeded. The line of Bash you've written is effec... | Not able to do multiple && without bracket, and how to do in [[ .. ]] in bash script | linux|bash|script | -3 | 57 | 1 | 72,875,799 | 72,875,799 | 0 | true | 2022-07-05T21:15:25.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not able to do multiple && without bracket, and how to do in [[ .. ]] in bash script<p>I've tried to use "test" between if but still error is there... |
73,023,448 | display:block with pseudo-class not working inside div<p>I was working with pseudo-classes (link, visited, and active) and I have an issue about positioning a link below the others (like a list, I know I can use a list but want to know why is this happening), used display: block but isn't working, the first one works b... | <p>just set this code:</p>
<pre><code>.divlink a {
display: block;
}
</code></pre>
<p>just remove all those codes and put this.
this will make the link just like what you've wanted as an output.</p> | display:block with pseudo-class not working inside div | html|css|pseudo-class | -2 | 57 | 2 | 73,024,200 | 73,024,200 | 0 | true | 2022-07-18T13:50:30.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
display:block with pseudo-class not working inside div<p>I was working with pseudo-classes (link, visited, and active) and I have an issue about positioning ... |
73,027,098 | VBA IF condition with an error that just works for the first loop<p>I am trying to create a graph using VBA. First of all, I have a dashboard and I would like to have a main sheet that summarize some name that I want to search for, so all my data are in other sheets.</p>
<p>I am trying to create a VBA IF condition that... | <p>Some suggested changes, including the <code>Step 15</code></p>
<pre class="lang-vb prettyprint-override"><code>Sub graph()
Dim cht As Chart, co As Object
Dim i As Long
Dim LastRow As Long, rngX As Range, rngY As Range
Dim LastColumn As Long, wsMain As Worksheet, wsVol As Worksheet, wsData As Workshe... | VBA IF condition with an error that just works for the first loop | excel|vba|if-statement|conditional-statements|dashboard | 0 | 57 | 1 | 73,028,007 | 73,028,007 | 0 | true | 2022-07-18T18:39:17.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA IF condition with an error that just works for the first loop<p>I am trying to create a graph using VBA. First of all, I have a dashboard and I would lik... |
72,813,274 | Swagger naming issue with generics<p>I want swagger to generate models seperately for generic sub models as shown in the example below:</p>
<pre><code>public class TheModel<T>
{
public IEnumerable<T> GenericModel { get; set; }
}
public class GenericModel
{
}
public class AnotherGenericModel
{
}
</code... | <p>I have solved my own question and came up with the following solution shown below:</p>
<pre><code>public class GenericFilter : ISchemaFilter
{
public void Apply(OpenApiSchema schema, SchemaFilterContext context)
{
var type = context.Type;
if (type.IsGenericType == false)
return;
... | Swagger naming issue with generics | c#|swagger|swagger-ui|swashbuckle | 0 | 57 | 1 | 72,814,699 | 72,814,699 | 0 | true | 2022-06-30T09:18:43.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swagger naming issue with generics<p>I want swagger to generate models seperately for generic sub models as shown in the example below:</p>
<pre><code>public... |
72,961,734 | Convert Map to Raw JSON convertion using java<p>I have enabled webhook on Shopify. Shopify sends raw JSON in webhook response. Somehow it is converted to map and now I want to convert it back to raw JSON that Shopify sends for HMAC verification. Can someone help how it can be done in JAVA? What encoding is applied to d... | <p>Serializing Map to JSON is a very simple task in Java. You may use any of JSON libraries, the most popular are Json Jackson (also known asFaster XML) or Gson of Google. But if you want even simpler solution, I wrote my own thin wrapper over Jackson Json that allows you to serialize an object to JSON or deserialize i... | Convert Map to Raw JSON convertion using java | java|json|shopify | 1 | 57 | 2 | 72,964,860 | 72,964,860 | 0 | true | 2022-07-13T06:19:11.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert Map to Raw JSON convertion using java<p>I have enabled webhook on Shopify. Shopify sends raw JSON in webhook response. Somehow it is converted to map... |
72,835,358 | Angular - Help me find the eslint rule or compiler option to prevent variable typo's in functions<p>So I've recently switched from tslint to eslint and have activated a lot of rules for my typescript to be more solid.</p>
<p>I however haven't found how to prevent typo's of my class variables in a function.
Take this ex... | <p>It seems that my issue was caused by a previous setting either in <code>tslint</code> or compiler options that caused a new class variable to be created instead of flagging the typo in the Seal Setter.</p>
<p>I realized I had a variable (which I did not create) added to my class that made every typo valid</p>
<pre><... | Angular - Help me find the eslint rule or compiler option to prevent variable typo's in functions | angular|compilation|eslint | 0 | 57 | 1 | 72,856,719 | 72,856,719 | 0 | true | 2022-07-01T23:15:18.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular - Help me find the eslint rule or compiler option to prevent variable typo's in functions<p>So I've recently switched from tslint to eslint and have ... |
72,836,725 | incompatibility of Keycloak standalone-ha instances<p>I have 2 Keycloak 15.0.2 instances on localhost with different ports configured by standalone-ha.xml.
If I make some changes in authentication flows (e.g. coping a flow , add or delete some executions , ...) on a instance, the other instance isn't affected by the ch... | <p>Finally, I found out that for solving the issue, the Keycloak instances should be deployed by configuring <code>-Djboss.node.name & -Djboss.tx.node.id</code>.</p>
<p>For more details, you can check this <a href="https://keycloak.discourse.group/t/realm-cache-in-standalone-ha-vs-domain-clustered-mode/12675/8" rel... | incompatibility of Keycloak standalone-ha instances | keycloak | 0 | 57 | 1 | 72,933,646 | 72,933,646 | 0 | true | 2022-07-02T05:36:46.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
incompatibility of Keycloak standalone-ha instances<p>I have 2 Keycloak 15.0.2 instances on localhost with different ports configured by standalone-ha.xml.
I... |
72,768,910 | How to access to tag style with React.js<p>I want to change the background color by changing the page width by conditionally writing, but to do this I need to be able to access the styles</p>
<p>If we wanted to write this code in JavaScript, it would be like this:</p>
<p><div class="snippet" data-lang="js" data-hide="f... | <p>I would suggest you to do that with css code by simply using media-query.</p>
<pre class="lang-css prettyprint-override"><code>#number1 {
@media screen and (min-width: _yourBreakpoint_) {
background-color: "red";
}
}
</code></pre>
<p>Docs: <a href="https://www.w3schools.com/css/css3_mediaqueries_ex.... | How to access to tag style with React.js | javascript|reactjs|styles | 0 | 57 | 4 | 72,769,064 | 72,769,064 | 0 | true | 2022-06-27T08:12:05.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to access to tag style with React.js<p>I want to change the background color by changing the page width by conditionally writing, but to do this I need t... |
72,930,402 | Arangodb AQL nested subqueries relying on the data from another<p>I currently have three collections that need to be routed into one endpoint. I want to get the Course collection sort it, then from that course, I have to use nested subqueries to fetch a random review(there could be multiple tied to the same course) and... | <p>The result of the first <code>LET</code> query, <code>rev</code>, is an array with one element. You can re-write the complete query two ways:</p>
<ol>
<li>Set <code>rev</code> to the first element of the LET query result:</li>
</ol>
<pre><code>FOR c IN Courses
SORT c.averageRating DESC
LIMIT 3
... | Arangodb AQL nested subqueries relying on the data from another | arangodb|aql | 1 | 57 | 1 | 72,937,019 | 72,937,019 | 0 | true | 2022-07-10T17:11:40.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Arangodb AQL nested subqueries relying on the data from another<p>I currently have three collections that need to be routed into one endpoint. I want to get ... |
73,019,951 | Generating a nested dictionary in Python through iterations<p>I'm new in Python and I have to retrieve datas from a txt file (which I have already did) and then I need to make a nested dictionary like this:</p>
<pre><code>new_dict = {"2009-10-16": {"KitchenSensor":"active for x minutes today&qu... | <p>You're maybe looking for something like this; I separated the task into</p>
<ol>
<li>parsing the input lines (could be from a file, but here they're just a list) into events (3-tuples of datetime, sensor name and state)</li>
<li>grouping the events by date, and looking at the state changes.</li>
</ol>
<pre><code>imp... | Generating a nested dictionary in Python through iterations | python|dictionary|for-loop|nested-lists|dictionary-comprehension | 0 | 57 | 1 | 73,020,179 | 73,020,179 | 0 | true | 2022-07-18T09:18:09.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Generating a nested dictionary in Python through iterations<p>I'm new in Python and I have to retrieve datas from a txt file (which I have already did) and t... |
72,914,767 | TikZ-Feynman: Making a diagram with no horizontal propagator<p>This is a code for a Feynman diagram with a horizontal propagator (LuaTex is needed):</p>
<pre><code>\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\begin{tikzpicture}
\begin{feynman}
\di... | <p>You can place the vertices manually:</p>
<pre><code>% !TeX TS-program = lualatex
\documentclass{article}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\begin{tikzpicture}
\begin{feynman}
\vertex[dot] (m) at (0, 0) {};
\vertex (a) at (-2,-1) {$e^{-}$};
\vertex (b) at ( 2,-... | TikZ-Feynman: Making a diagram with no horizontal propagator | latex|diagram|tikz|overleaf | 1 | 57 | 1 | 72,916,128 | 72,916,128 | 0 | true | 2022-07-08T17:08:04.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TikZ-Feynman: Making a diagram with no horizontal propagator<p>This is a code for a Feynman diagram with a horizontal propagator (LuaTex is needed):</p>
<pre... |
72,944,398 | Google sheets Get Duration from a string<p>I want to get the duration dynamically from a string of text, like the example shown in the image example of input and output: <a href="https://docs.google.com/spreadsheets/d/1WC3u1x1740yqhuZTfa9s3ipO-eTYc2WFflP7lFgQZHI/edit?usp=sharing" rel="nofollow noreferrer">Link to the s... | <p>EDIT: You can do this on a single cell:</p>
<p><code>=IF(REGEXMATCH(A1;"\d+ days|day");REGEXEXTRACT(REGEXEXTRACT(A1;"\d+ day|days");"\d+");"")</code></p>
<p>Replace <code>A1</code> with your cell, and <code>day|days</code> with whatever unit you want.</p>
<p>Hopefully this can... | Google sheets Get Duration from a string | google-sheets|spreadsheet | 0 | 57 | 1 | 72,944,631 | 72,944,631 | 0 | true | 2022-07-11T20:37:06.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google sheets Get Duration from a string<p>I want to get the duration dynamically from a string of text, like the example shown in the image example of input... |
72,770,020 | React, getting Invalid Hook Call inside my service for creating an axios instance<p>I have a simple <code>service.js</code> that looks like this:</p>
<pre><code>import axios from 'axios'
import { useContext } from 'react'
import APIContext from '../context/api/context'
function GetApi() {
const { API } = useContext(... | <p>You can call a hook, <code>useContext</code> in your case, only in a React component or a custom hook (see <a href="https://reactjs.org/docs/hooks-rules.html" rel="nofollow noreferrer">Rules of Hooks</a>).</p>
<p>What you can do is to transform your service to a hook:</p>
<pre><code>import axios from 'axios'
import ... | React, getting Invalid Hook Call inside my service for creating an axios instance | javascript|reactjs|react-native|axios | 1 | 57 | 3 | 72,770,189 | 72,770,189 | 1 | true | 2022-06-27T09:43:59.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React, getting Invalid Hook Call inside my service for creating an axios instance<p>I have a simple <code>service.js</code> that looks like this:</p>
<pre><c... |
72,775,670 | Rego to check if a map, contains a key that is defined in a separate list<p>Given a map, we would like to check if any of the keys in that map matches any item in a list.</p>
<p>In the case of kubernetes annotations being the "map":</p>
<pre class="lang-yaml prettyprint-override"><code>metadata:
annotations... | <p>You'd normally use a set for the "deny" list, and then simply check each annotation for membership:</p>
<pre><code>package play
import future.keywords
denied_annotations := {
"external-dns.alpha.kubernetes.io/ttl",
"other-denied-annotation-1",
"other-denied-annotation... | Rego to check if a map, contains a key that is defined in a separate list | open-policy-agent|rego | 0 | 57 | 1 | 72,777,078 | 72,777,078 | 1 | true | 2022-06-27T16:48:15.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rego to check if a map, contains a key that is defined in a separate list<p>Given a map, we would like to check if any of the keys in that map matches any it... |
72,777,033 | Oracle: Taking columns from rows and putting them side by side<p>I'm having trouble figuring out how to do something in Oracle. I have this table:</p>
<pre><code>| id | rownum | code | gift |
|-----|--------|-----------|------|
|2000 | 1 | Ganymede | 437 |
|2000 | 2 | Alpha | 50 |
|2000 | 3 ... | <p>You can use <code>PIVOT</code>:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT id,
"1_CODE" AS code_1,
"1_GIFT" AS gift_1,
"2_CODE" AS code_2,
"2_GIFT" AS gift_2,
"3_CODE" AS code_3,
"3_GIFT" AS gift_3
... | Oracle: Taking columns from rows and putting them side by side | oracle|pivot|oracle-sqldeveloper | 0 | 57 | 1 | 72,778,674 | 72,778,674 | 1 | true | 2022-06-27T18:48:52.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Oracle: Taking columns from rows and putting them side by side<p>I'm having trouble figuring out how to do something in Oracle. I have this table:</p>
<pre>... |
72,780,117 | How to write variable contents to Console?<p>I want to use <a href="https://www.php.net/manual/en/function.var-dump.php" rel="nofollow noreferrer"><code>var_dump</code></a> to show the data held in a variable in C#, but I don't know the function to that in C#. If I use <code>Console.Write()</code>, I can only do it wit... | <p>There is a library I'm using for this, <a href="https://github.com/thomasgalliker/ObjectDumper" rel="nofollow noreferrer">ObjectDumper.NET</a><br />
Sample from the README:</p>
<pre><code>static void Main(string[] args)
{
var persons = new List<Person>
{
new Person { Name = "John", Ag... | How to write variable contents to Console? | c# | 1 | 57 | 3 | 72,780,286 | 72,780,286 | 1 | true | 2022-06-28T02:28:08.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write variable contents to Console?<p>I want to use <a href="https://www.php.net/manual/en/function.var-dump.php" rel="nofollow noreferrer"><code>var_... |
72,780,756 | Javascript program has something wrong ,I don't know why the length of log is not 10?<p>Javascript program has something wrong ,I don't know why the length of log is not 10?
the input s :</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre... | <p>The arguments you're giving to <code>substr()</code> are appropriate for <code>substring()</code>. Since <code>substr()</code> is deprecated, you should just change to <code>substring()</code> and you'll get the results you want.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-b... | Javascript program has something wrong ,I don't know why the length of log is not 10? | javascript | 0 | 57 | 4 | 72,780,813 | 72,780,813 | 1 | true | 2022-06-28T04:27:54.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript program has something wrong ,I don't know why the length of log is not 10?<p>Javascript program has something wrong ,I don't know why the length o... |
72,781,020 | How do I target and change the style of a different element when I click a button in react<p>How can I target a different react element inside the same component when I click on a button and how can this work when I reuse the component several times in my App.js?</p>
<p>I have created a react component that has a div a... | <p>You should use a state variable to control your div's visibility.</p>
<pre><code>class App extends Component {
constructor() {
super();
this.state = { hidden: false };
}
handleFinish = () => {
console.log("CLickedddd");
this.setState({ hidden: !this.state.hidden });
};
render... | How do I target and change the style of a different element when I click a button in react | javascript|reactjs | 0 | 57 | 2 | 72,781,192 | 72,781,192 | 1 | true | 2022-06-28T05:12:23.573Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I target and change the style of a different element when I click a button in react<p>How can I target a different react element inside the same compo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.