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,862,648 | Difference between PDL::Core and PDL::Core ':Internal'<p>I just started using PDL and saw in the documentation that there are 2 possible ways of importing PDL's core function:</p>
<pre class="lang-perl prettyprint-override"><code>use PDL::Core;
use PDL::Core ':Internal';
</code></pre>
<p>What exactly is the difference ... | <pre class="lang-perl prettyprint-override"><code>use PDL::Core;
</code></pre>
<p>is equivalent to</p>
<pre class="lang-perl prettyprint-override"><code>use PDL::Core ':Func';
</code></pre>
<p>which is equivalent to</p>
<pre class="lang-perl prettyprint-override"><code>use PDL::Core
qw( piddle pdl null barf ),
( ... | Difference between PDL::Core and PDL::Core ':Internal' | perl|pdl | 3 | 57 | 2 | 72,862,777 | 72,862,777 | 4 | true | 2022-07-04T22:59:39.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Difference between PDL::Core and PDL::Core ':Internal'<p>I just started using PDL and saw in the documentation that there are 2 possible ways of importing PD... |
72,847,710 | Why are some JavaScript functions given conjugated names and not others?<p>As a non-english developer, I often wonder why some javascript functions take a "s" and others don't.</p>
<p>Example:</p>
<pre><code>Array.includes()
Element.contains()
</code></pre>
<p>I could figure it's because they are verbs conjug... | <p>As someone who was an English teacher, I'll firstly say that the main reason this is the case is because English kinda <em>sucks</em>. The grammar is weird, and no matter how many rules you memorize, you'll never speak it absolutely perfectly. Even us native speakers struggle with grammar on a daily basis.</p>
<p>To... | Why are some JavaScript functions given conjugated names and not others? | javascript | 3 | 57 | 1 | 72,847,950 | 72,847,950 | 4 | true | 2022-07-03T15:24:36.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why are some JavaScript functions given conjugated names and not others?<p>As a non-english developer, I often wonder why some javascript functions take a &q... |
72,842,808 | Are these lines of code in C programming the same<p>Are these 2 lines of code the same ??</p>
<p><strong>line 1:</strong></p>
<pre><code>void (**foo)(int)
</code></pre>
<p><strong>line 2</strong></p>
<pre><code>void *(*foo)(int)
</code></pre>
<p>Kindly help me understand on what is happening.</p> | <p>They are not the same.</p>
<pre><code>void (**foo)(int);
</code></pre>
<p><code>foo</code> is a pointer to a pointer to a function that takes an <code>int</code> parameter and returns <code>void</code>.</p>
<pre><code>void *(*foo)(int):
</code></pre>
<p><code>foo</code> is a pointer to a function that takes an <code... | Are these lines of code in C programming the same | c | 4 | 57 | 1 | 72,842,838 | 72,842,838 | 5 | true | 2022-07-02T22:26:54.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Are these lines of code in C programming the same<p>Are these 2 lines of code the same ??</p>
<p><strong>line 1:</strong></p>
<pre><code>void (**foo)(int)
</... |
72,879,398 | How can I add for each grouped object new key value in javascript?<p>Hi all I have following array</p>
<pre><code>
const arr = [
{
ImageFileSet: [{ id: 1 }],
LineItemFile: "new name",
LineItemRef: "PDF",
id: 44
},
{
ImageFileSet: [{ id: 7 ... | <p>you can do something 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-js lang-js prettyprint-override"><code>const arr = [{
ImageFileSet: [{
id: 1
}],
LineItemFile: "new name",
Line... | How can I add for each grouped object new key value in javascript? | javascript | 3 | 57 | 3 | 72,879,439 | 72,879,439 | 5 | true | 2022-07-06T07:23:39.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I add for each grouped object new key value in javascript?<p>Hi all I have following array</p>
<pre><code>
const arr = [
{
ImageFile... |
72,887,800 | Under what conditions is a process allowed to set the foreground window using the Win32 function SetForegroundWindow?<p>I want to understand under what conditions a process can set the foreground window using the Win32 function <a href="https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setforeground... | <p>MSDN docs have been migrated a lot of times to different formats. Every time Microsoft did that, the documentation has suffered.</p>
<p>The <a href="https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#foreground-and-background-windows" rel="nofollow noreferrer">Window Features</a> article is more c... | Under what conditions is a process allowed to set the foreground window using the Win32 function SetForegroundWindow? | winapi | 4 | 57 | 1 | 72,888,249 | 72,888,249 | 5 | true | 2022-07-06T17:38:12.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Under what conditions is a process allowed to set the foreground window using the Win32 function SetForegroundWindow?<p>I want to understand under what condi... |
72,976,841 | Why does OCaml think that this function takes an int parameter when nothing suggests that it should be the case?<p>I was working on chapter 1 of Modern Compiler Implementation in ML by Andrew Appel and I decided to implement it in OCaml instead of SML. I'm new to OCaml and I came across a very frustrating problem. OCam... | <p>Base defines <code>=</code> as <a href="https://v3.ocaml.org/p/base/v0.15.0/doc/Base/index.html#val-(=)" rel="noreferrer"><code>int -> int -> bool</code></a>, so when you have the expression <code>name = i</code> the compiler will infer them as <code>int</code>s.</p>
<p>You can access the polymorphic functions... | Why does OCaml think that this function takes an int parameter when nothing suggests that it should be the case? | ocaml|ocaml-core | 0 | 57 | 1 | 72,977,160 | 72,977,160 | 5 | true | 2022-07-14T07:35:05.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does OCaml think that this function takes an int parameter when nothing suggests that it should be the case?<p>I was working on chapter 1 of Modern Compi... |
72,784,373 | Weird LTO behavior with -ffast-math<h1>Summary</h1>
<p>Recently I encountered a weird issue regarding LTO and <code>-ffast-math</code> where I got inconsistent result for my "pow" ( in <code>cmath</code> ) calls depending on whether <code>-flto</code> is used.</p>
<h1>Environment:</h1>
<pre><code>$ g++ --vers... | <p>man gcc:</p>
<blockquote>
<p>To use the link-time optimizer, <code>-flto</code> and optimization options should be specified at compile time and during the final link. It is recommended that you compile all the files participating in the same link with the same options and also specify those options at link time. ... | Weird LTO behavior with -ffast-math | c++|g++|glibc|lto|fast-math | 1 | 57 | 2 | 72,785,068 | 72,785,068 | 6 | true | 2022-06-28T09:57:52.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Weird LTO behavior with -ffast-math<h1>Summary</h1>
<p>Recently I encountered a weird issue regarding LTO and <code>-ffast-math</code> where I got inconsiste... |
72,932,271 | How (and how often) does Git scan the working directory for "untracked" files?<p>Once you run git init on a directory, git knows about all files that exist in that directory and below. These are untracked files. I'm familiar enough (ish) with what happens when you stage those files and they become "tracked" f... | <p>This <em>used to</em> have a simple and easy answer, 5 or more years ago. Now, it's ... much more complicated. However, the <em>behavior</em> today is supposed to match that of yore, so if you don't care about the actual implementation—and you're not supposed to <em>have to</em> care—we can describe the <em>old</e... | How (and how often) does Git scan the working directory for "untracked" files? | git | 2 | 57 | 1 | 72,933,309 | 72,933,309 | 6 | true | 2022-07-10T22:25:08.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How (and how often) does Git scan the working directory for "untracked" files?<p>Once you run git init on a directory, git knows about all files that exist i... |
72,776,322 | dict.keys() equality, order irrelevant<p>Why do I get <code>True</code> why comparing <code>dict.keys()</code> when the keys are in different orders? I'm on windows cpython 3.10, which preserves insertion order since 3.6+, but I wonder if this result holds for earlier versions.</p>
<pre><code>d1 = {1:2, 2:3, 3:4}
d2 =... | <p>The docs for <a href="https://docs.python.org/3/library/stdtypes.html#dictionary-view-objects" rel="noreferrer">Dictionary view objects</a> explain as follows:</p>
<blockquote>
<p>Keys views are set-like since their entries are unique and hashable. If all values are hashable, so that (key, value) pairs are unique an... | dict.keys() equality, order irrelevant | python | 1 | 57 | 2 | 72,776,376 | 72,776,376 | 7 | true | 2022-06-27T17:43:52.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
dict.keys() equality, order irrelevant<p>Why do I get <code>True</code> why comparing <code>dict.keys()</code> when the keys are in different orders? I'm on... |
72,920,805 | How versatile are c++'s templates?<p>I want to write a highly optimized code in C++ and there is a templated structure which takes a type variable <code>T</code>. There is one function <code>wow()</code> in that structure that can be optimized to run twice faster if and only if the size of <code>T</code> is a power of ... | <p>I would use <a href="https://en.cppreference.com/w/cpp/language/if#Constexpr_if" rel="noreferrer"><em>constexpr if</em></a> and <a href="https://en.cppreference.com/w/cpp/numeric/has_single_bit" rel="noreferrer"><code>std::has_single_bit</code></a>:</p>
<pre class="lang-cpp prettyprint-override"><code>#include <b... | How versatile are c++'s templates? | c++|templates|struct|branch | 0 | 57 | 1 | 72,920,848 | 72,920,848 | 7 | true | 2022-07-09T11:01:17.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How versatile are c++'s templates?<p>I want to write a highly optimized code in C++ and there is a templated structure which takes a type variable <code>T</c... |
72,772,914 | implode array how to make it right?<p>I have a form in php wich has some checkboxes named <code>skills[]</code>, I want to know how to implode and post the correct way in this code, I was used to the usual msqli or normal post syntax, but now that I made country state city dropdown I can't figure out a way to correctly... | <p>Inside you're <code>if(isset($_POST['country']))</code></p>
<p>After you're <code>include()</code> do:</p>
<pre><code>$checkedSkills = implode(", ", $_POST['skills']);
...
$statement->execute(
array(
':country' => $_POST['country'],
':state' => $_POST['state'],
... | implode array how to make it right? | php|mysql|pdo | -1 | 57 | 1 | 72,773,004 | 72,773,004 | -1 | true | 2022-06-27T13:27:33.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
implode array how to make it right?<p>I have a form in php wich has some checkboxes named <code>skills[]</code>, I want to know how to implode and post the c... |
72,880,504 | what should I do flutter. _TypeError (type 'String' is not a subtype of type 'int' of 'index')<p>Help me please, I really need help.
I don't know how to fix it.</p>
<p><a href="https://i.stack.imgur.com/5uxAM.png" rel="nofollow noreferrer">IMAGE</a></p>
<p><a href="https://i.stack.imgur.com/CghRH.png" rel="nofollow nor... | <p>This type mismatch error which means that you provide "String value " but needs of integer type value
for more information you refere this link <a href="https://stackoverflow.com/questions/53416469/type-string-is-not-a-subtype-of-type-int-of-index">Type 'String' is not a subtype of type 'int... | what should I do flutter. _TypeError (type 'String' is not a subtype of type 'int' of 'index') | php|mysql|flutter|dart|phpmyadmin | -5 | 57 | 1 | 72,880,637 | 72,880,637 | -1 | true | 2022-07-06T08:51:36.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what should I do flutter. _TypeError (type 'String' is not a subtype of type 'int' of 'index')<p>Help me please, I really need help.
I don't know how to fix ... |
72,922,119 | Is it possible to take the Local Variable of a Function and convert it to a Global Variable or use it in an other Function<p>I'd like to know, If I can use the Local Variable of a Function (I'll call it for now Fct.1) in an other Function (Fct.2) (so that a variable in Fct.2 is assgined the same value of a Variable in ... | <p>There are a few ways in Python through which you can manipulate global and local variables of different objects from other objects. Most of those are advanced coding and some include fiddleing with Python interpreter mechanisms. However, what you want is quite simple:</p>
<pre><code>some_global_var = None # Declare ... | Is it possible to take the Local Variable of a Function and convert it to a Global Variable or use it in an other Function | python|function|variables|global|local | 0 | 57 | 2 | 72,922,552 | 72,922,552 | -1 | true | 2022-07-09T14:20:33.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to take the Local Variable of a Function and convert it to a Global Variable or use it in an other Function<p>I'd like to know, If I can use t... |
72,890,265 | i can't read and parse xml file in php<p>i have a xml file and I am trying to access the data in a xml file but it return an empty array.</p>
<p>i have a xml file and I am trying to access the data in a xml file but it return an empty array.</p>
<p>Could the problem be in the file itself?</p>
<p>I have tried to use Bas... | <p>Here's one for you:</p>
<pre><code><?php
$xmldata = file_get_contents("https://egytech4uu.herokuapp.com/data.xml");
$xmlparser = xml_parser_create();
$arr = [];
xml_parse_into_struct($xmlparser, $xmldata, $arr);
xml_parser_free($xmlparser);
print_r($arr);
</code></pre>
<p>So what's going there? It retur... | i can't read and parse xml file in php | php|xml|simplexml | 0 | 57 | 2 | 72,890,647 | 72,890,647 | -1 | true | 2022-07-06T21:54:47.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
i can't read and parse xml file in php<p>i have a xml file and I am trying to access the data in a xml file but it return an empty array.</p>
<p>i have a xml... |
72,781,730 | how can I setting the user-agent when in pyside6 WebEngineView<p>I wrote a Windows software in python and pyside6, in which I opened an interface with QwebEngine, is there any way to define the information such as this embedded browser request header</p>
<p>here are my code of this part</p>
<pre><code>self.webEngineVie... | <p>You would just need to load a QWebEngineHttpRequest with the modified user agent header instead of a url</p>
<p>for example</p>
<pre><code>from PySide6.QtWebEngineCore import QWebEngineHttpRequest
self.webEngineView = QWebEngineView()
self.initialUrl = 'http://www.bing.com'
user_agent = b"Mozilla/5.0 (Andro... | how can I setting the user-agent when in pyside6 WebEngineView | python|pyside2|pyside6|qwebengineview | -3 | 58 | 1 | 72,782,972 | 72,782,972 | 0 | true | 2022-06-28T06:36:08.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can I setting the user-agent when in pyside6 WebEngineView<p>I wrote a Windows software in python and pyside6, in which I opened an interface with QwebEn... |
72,778,011 | Outlook displays "mshtml.HTMLTableRowClass" instead of Html Row<p>I'm trying to get a row of a table from a Webpage and fill the HTML Code into an HTML E-Mail. I'm using Powershell for this.</p>
<pre><code>$ie = New-Object -com InternetExplorer.Application
$ie.visible = $false
$ie.navigate(www.example.com)
$htmlDetai... | <p>I figured it out.
Because I was using getElementsByClassName("className"), it returned a array back. So to get to the innerHtml i had to acess like this.</p>
<pre><code>$htmlDetailedRow = $ie.document.documentElement.getElementsByClassName("className")
$htmlDetailedRow[0].innerHTML
</code></... | Outlook displays "mshtml.HTMLTableRowClass" instead of Html Row | html|powershell|outlook|html-email | 1 | 58 | 2 | 72,783,972 | 72,783,972 | 0 | true | 2022-06-27T20:35:57.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Outlook displays "mshtml.HTMLTableRowClass" instead of Html Row<p>I'm trying to get a row of a table from a Webpage and fill the HTML Code into an HTML E-Mai... |
72,784,032 | How to classify new data using a pre-trained model - Python Text Classification (NLTK and Scikit)<p>I am very new to Text Classification and I am trying to classify each line of a dataset composed by twitter comments according to some pre-defined topics.</p>
<p>I have used the code bellow in Jupyter Notebook to build a... | <p>It seems than after training you just have to do as for your validation step using directly the grid-searcher, which in sklearn library is also used after training as a model taking the best found hyperparameters.
So take a X which is what you want to evaluate and run</p>
<pre><code>preds_mnnb = gs_mnnb.predict(X)
<... | How to classify new data using a pre-trained model - Python Text Classification (NLTK and Scikit) | python|scikit-learn|nltk|text-classification|nltk-trainer | 1 | 58 | 1 | 72,784,178 | 72,784,178 | 0 | true | 2022-06-28T09:34:31.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to classify new data using a pre-trained model - Python Text Classification (NLTK and Scikit)<p>I am very new to Text Classification and I am trying to c... |
72,783,718 | How to print data like username after login[php- codeigniter]<p>I try to print user id and it works but when I try to print username i try different methods from net but nothing works for me. can someone help me to print username :D</p>
<p>looks like this:
<a href="https://i.stack.imgur.com/M7l9K.png" rel="nofollow nor... | <p>Assumption:- you are getting user data in $result variable as same as you get id</p>
<pre><code>function login_post(){
print_r($_POST);
if (isset($_POST)){
$email=$_POST['email'];
$password=$_POST['password'];
$query = $this->db->query("SELECT * FROM `backenduser` WHERE `username`='$email' AN... | How to print data like username after login[php- codeigniter] | php|mysql|codeigniter|authentication|xampp | 0 | 58 | 2 | 72,784,784 | 72,784,784 | 0 | true | 2022-06-28T09:11:36.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to print data like username after login[php- codeigniter]<p>I try to print user id and it works but when I try to print username i try different methods ... |
72,792,144 | How can I censor any words from a textarea that are between quotation marks?<p>I am building a text censor web app, which would censor any words from a textarea which are between quotation marks. E.g The dog is "red" = The dog is "XXX", The dog is "quite big" = The dog is "XXXXX XXX&q... | <p>This is a pretty simple version of <code>censored</code>:</p>
<pre class="lang-js prettyprint-override"><code>const censored = (w) =>
w .replace(/"([^"]+)"/g, (_, s) => `"${s.replace(/\S/g, 'X')}"`)
</code></pre>
<p>We find all text between two quotation marks, replace it by repla... | How can I censor any words from a textarea that are between quotation marks? | javascript|html|css | 1 | 58 | 3 | 72,793,410 | 72,793,410 | 0 | true | 2022-06-28T19:27:19.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I censor any words from a textarea that are between quotation marks?<p>I am building a text censor web app, which would censor any words from a texta... |
72,801,220 | SWIFT Message Testing using Jmeter<p>I need help, I have been told to do performance testing using Jmeter on IBM MQ for <strong>SWIFT message types, they are the format or schema used to send messages to financial institutions on the SWIFT network</strong>.</p>
<p>Has anyone had done any testing using jmeter, I need he... | <p>Sample code for sending messages to IBMMQ is quite simple:</p>
<pre><code>import com.ibm.msg.client.jms.JmsFactoryFactory
import com.ibm.msg.client.wmq.WMQConstants
import javax.jms.Session
def hostName = "your IBMMQ Host"
def hostPort = 1414
def channelName = "DEV.APP.SVRCONN"
def queueManager... | SWIFT Message Testing using Jmeter | jmeter | 0 | 58 | 1 | 72,801,454 | 72,801,454 | 0 | true | 2022-06-29T12:11:26.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SWIFT Message Testing using Jmeter<p>I need help, I have been told to do performance testing using Jmeter on IBM MQ for <strong>SWIFT message types, they are... |
72,805,195 | Flutter - ListView scroll not working (bottom overflows by some pexels)<p>Flutter - While importing listview widget from one file then it just throws an error on the app's screen "Bottom overflowed by 500 pixels" but when if listview is directly used inside the home file it works fine. only throws error while... | <p>simply wrapped listview inside sizedbox and gave it a height of 150 and it's done we are good to go!☺☺</p>
<pre><code>SizedBox(
child: ListView(
shrinkWrap: true,
physics: const AlwaysScrollableScrollPhysics(),
children: [
Row(
... | Flutter - ListView scroll not working (bottom overflows by some pexels) | flutter|error-handling|flutter-layout|android-widget | 0 | 58 | 3 | 72,807,825 | 72,807,825 | 0 | true | 2022-06-29T16:57:19.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter - ListView scroll not working (bottom overflows by some pexels)<p>Flutter - While importing listview widget from one file then it just throws an erro... |
72,799,559 | Passing parameters with method call<p>I'm trying to pass a parameter by method cal in a bounded task between two pages: departments and employees, and I'm trying to make employees filter by departmentId.
I have a criteria view on employees doing this filter with a Bind Variable vcDeptId and in java:</p>
<pre><code>publ... | <p>Actually, you do the filter. However, you do it on a different instance of the view object (VO). When you get the VO from the application module, as you do, you get another fresh instance, not the one used for the table.
The table shows data based on an interator binding from the pages pagedef file
<a href="https://... | Passing parameters with method call | oracle-adf | 1 | 58 | 2 | 72,812,290 | 72,812,290 | 0 | true | 2022-06-29T10:08:23.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing parameters with method call<p>I'm trying to pass a parameter by method cal in a bounded task between two pages: departments and employees, and I'm tr... |
72,812,928 | What can you do with Writing Python using IntelliJ IDEA?<p>I added the Python project to IntelliJ IDEA.
What is the use of these options at creation time?
What can they do?
<a href="https://i.stack.imgur.com/fukDs.png" rel="nofollow noreferrer">options</a></p> | <p>virtualenv is used to manage Python packages for different projects. Using virtualenv allows you to avoid installing Python packages globally which could break system tools or other projects. You can install virtualenv using pip. If you wanna learn more you can go through this article well explained <a href="https:/... | What can you do with Writing Python using IntelliJ IDEA? | python|intellij-idea | -2 | 58 | 2 | 72,812,999 | 72,812,999 | 0 | true | 2022-06-30T08:53:10.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What can you do with Writing Python using IntelliJ IDEA?<p>I added the Python project to IntelliJ IDEA.
What is the use of these options at creation time?
Wh... |
72,815,681 | How can I display two items of Carousel in the frontend by TYPO3?<p>I want to display two items of carousel side by side in the frontend in TYPO3, but I can display just one item now.</p>
<p>I have no idea how I can write some codes with Fluid in a HTML-file to display two items.
I use a plug-In <code>bootstrap_package... | <p>That't actually more a styling thing. Take a slider plugin that fit your needs e.g. <a href="https://swiperjs.com/demos#slides-per-view" rel="nofollow noreferrer">https://swiperjs.com/demos#slides-per-view</a>
and build the template (html, css, js) according to your needs.</p> | How can I display two items of Carousel in the frontend by TYPO3? | html|typo3|carousel|fluid | 0 | 58 | 2 | 72,815,809 | 72,815,809 | 0 | true | 2022-06-30T12:17:22.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I display two items of Carousel in the frontend by TYPO3?<p>I want to display two items of carousel side by side in the frontend in TYPO3, but I can ... |
72,816,842 | How to scrape multiple pages of a site using paging using BeautifulSoup and requests?<p>I created a scraper using BeautifulSoup and requests that scrapes the search results of the site <a href="https://Ask.com" rel="nofollow noreferrer">Ask.com</a> based on the keywords entered by the user. For now this scraper is limi... | <p>If your page is working for single page then with a little change it will work on next pages also. Just try to change page number in the url as <code>ask.com</code> supports it.</p>
<pre><code>def search(request):
if request.method == 'POST':
search = request.POST['search']
max_pages_to_scrap = ... | How to scrape multiple pages of a site using paging using BeautifulSoup and requests? | python|beautifulsoup|pagination | 1 | 58 | 1 | 72,817,207 | 72,817,207 | 0 | true | 2022-06-30T13:39:11.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to scrape multiple pages of a site using paging using BeautifulSoup and requests?<p>I created a scraper using BeautifulSoup and requests that scrapes the... |
72,818,501 | Cannot convert argument 1 from 'int' to 'int [][8]<p>I'm trying to make chess in the c++ console and I have a function that searches for the piece you want to move. The first parameter is the 2d array that stores the board's state. But when I call the function in the move function it gives me this error:</p>
<blockquot... | <p><code>search_piece</code> function gets a two-dimensional array as its first argument, but in the move function where you call it, you just pass a single integer not an array.
<code>v[8][8]</code> in <code>pair<int, int> pos = search_piece(v[8][8], col, piece, colour); </code> is a single element of <code>v</c... | Cannot convert argument 1 from 'int' to 'int [][8] | c++|multidimensional-array|parameter-passing | -1 | 58 | 1 | 72,818,858 | 72,818,858 | 0 | true | 2022-06-30T15:36:09.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot convert argument 1 from 'int' to 'int [][8]<p>I'm trying to make chess in the c++ console and I have a function that searches for the piece you want t... |
72,827,569 | How can I read message by message with recv in an AF_UNIX socket with C/C++?<p>I am trying to write a client for my AF_UNIX server. The server occasionally does a</p>
<pre><code>write(fd, buffer, bufferSize);
</code></pre>
<p>where the message always ends in a newline.</p>
<p>Now, I want a C client to read it, message ... | <pre><code>recv(socketfd, buffer, 1024, NULL);
</code></pre>
<p>With stream sockets, like <code>AF_UNIX</code> sockets, <code>recv()</code> is equivalent to <code>read()</code>. That's what makes them "stream" sockets. So, for all practical matters, this is:</p>
<pre><code>read(socketfd, buffer, 1024);
</code... | How can I read message by message with recv in an AF_UNIX socket with C/C++? | c++|c|linux|sockets|unix | 1 | 58 | 1 | 72,828,326 | 72,828,326 | 0 | true | 2022-07-01T09:59:42.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I read message by message with recv in an AF_UNIX socket with C/C++?<p>I am trying to write a client for my AF_UNIX server. The server occasionally d... |
72,829,339 | Is it not possible to use events of parent class?<p>I have separate classes for jumping and running. There could be other animatable movements, like climbing, flying, who knows what I'll come up with. Therefore it would make sense to make all these movement classes to inherit from a class called AnimatableMovement. Its... | <p>That's how events work: the only class that's allowed to raise an event, is the class that defines that event.</p>
<p>Rename the event to drop the "On" prefix, then add a dedicated method to raise it - the "On" prefix is usually understood to identify a method that raises an event (or one that ha... | Is it not possible to use events of parent class? | c#|visual-studio|unity3d | 2 | 58 | 3 | 72,829,520 | 72,829,520 | 0 | true | 2022-07-01T12:34:06.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it not possible to use events of parent class?<p>I have separate classes for jumping and running. There could be other animatable movements, like climbing... |
72,828,372 | <p> is not in the result inside a PHP condition<p>what is the wrong in this code that makes the removed from the result</p>
<pre><code><?php if(the_field('price',$postID)) : ?>
<p class="price"> <?php the_field('price',$postID) ; ?></p>
<?php endif; ?>
</... | <p>Just change</p>
<pre><code>the_field('price',$postID)
</code></pre>
<p>By</p>
<pre><code>get_field('price',$postID)
</code></pre>
<p>And Enjoy!</p> | <p> is not in the result inside a PHP condition | php|html|wordpress|advanced-custom-fields | 1 | 58 | 3 | 72,829,739 | 72,829,739 | 0 | true | 2022-07-01T11:11:04.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
<p> is not in the result inside a PHP condition<p>what is the wrong in this code that makes the removed from the result</p>
<pre><code><?php if(the_field... |
72,829,238 | Submit data into table based on certain input field in HTML form<p>I am currently creating a survey where the answers are entered into a database.</p>
<p>I have 2 main tables:</p>
<ul>
<li>questions, with 2 columns: questionID and questionBody</li>
<li>answers, with 3 columns: answerID, questionID (I want this to be ti... | <p>Yes it's completely possible. Just put the question ID as a hidden field in the form, and it will be submitted along with the answer data when the form is submitted. Then you can retrieve it from the <code>$_POST</code> data just like the answer, and use it in your SQL query.</p>
<p>For example:</p>
<p>HTML form:</p... | Submit data into table based on certain input field in HTML form | php|html|mysql|database|forms | 1 | 58 | 2 | 72,829,792 | 72,829,792 | 0 | true | 2022-07-01T12:25:04.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Submit data into table based on certain input field in HTML form<p>I am currently creating a survey where the answers are entered into a database.</p>
<p>I h... |
72,834,709 | Converting DTO to Entity Manually<p>I'm new here and also new in this developer world! I started my studies in the beginning of this year and now I am trying to do a very simple Spring Boot API REST project. However I'm not getting how can I convert DTO to an Entity and then return it to the Controller.</p>
<p>I'd like... | <blockquote>
<p>I'm not getting how can I convert DTO to an Entity and then return it
to the Controller.</p>
</blockquote>
<p>-> It is not a good design to expose the entity to the end user. You must convert that entity to a dto and then share it with the end user in case it is required.</p>
<p>This is a sample desi... | Converting DTO to Entity Manually | java|spring-boot | 0 | 58 | 1 | 72,834,922 | 72,834,922 | 0 | true | 2022-07-01T21:18:47.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converting DTO to Entity Manually<p>I'm new here and also new in this developer world! I started my studies in the beginning of this year and now I am trying... |
72,800,666 | TypeORM 0.3.6 errs processing raw SQL while running migrations<p>I am working with the below code, which worked fine with <code>typeorm</code> <code>0.2.x</code>. I am trying to upgrade my packages to <code>0.3.6</code>. It could be that the problem is somehow Mac-specific. Yet, I am not sure.</p>
<p>The script is belo... | <p>The below works fine [on both Mac and Linux] with <code>typeorm</code> 0.3.6:</p>
<pre><code>await queryRunner.manager.query(...)
</code></pre> | TypeORM 0.3.6 errs processing raw SQL while running migrations | orm|typeorm | 0 | 58 | 1 | 72,838,754 | 72,838,754 | 0 | true | 2022-06-29T11:30:15.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TypeORM 0.3.6 errs processing raw SQL while running migrations<p>I am working with the below code, which worked fine with <code>typeorm</code> <code>0.2.x</c... |
72,838,032 | I want to calculate a formula in R<p>I have a dataset that starts like this:</p>
<p><a href="https://i.stack.imgur.com/2TX99.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2TX99.png" alt="Dataset" /></a></p>
<p>In dput it is</p>
<pre><code>structure(list(20, TRUE, c(0, 0, 1, 1, 1, 1, 2, 3, 4, 4, 4, ... | <p>It isn't entirely clear how you wish to apply the given formula to your example data set, that is, exactly what inputs you are using and what outputs you wish to achieve. Hence, it also isn't clear if the following approach will be sufficient for your purposes. Here is my interpretation thus far.</p>
<p>If one int... | I want to calculate a formula in R | r | 0 | 58 | 1 | 72,840,335 | 72,840,335 | 0 | true | 2022-07-02T09:37:55.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to calculate a formula in R<p>I have a dataset that starts like this:</p>
<p><a href="https://i.stack.imgur.com/2TX99.png" rel="nofollow noreferrer"><... |
72,828,028 | MNIST Neural Network not learning - Micheal Nielsen Example<p>I have been trying to code up the neural network for recognizing MNIST that was given by Michael Nielsen here <a href="http://neuralnetworksanddeeplearning.com/chap1.html" rel="nofollow noreferrer">http://neuralnetworksanddeeplearning.com/chap1.html</a></p>
... | <p>I found the mistake... By mistake I zipped up the training images with the test labels to form the test set, which is clearly not what it should be. Now that I formed the test set properly, everything works and gets up to around 95% accuracy. Here is the full corrected code for completeness (usable in Python3)</p>
<... | MNIST Neural Network not learning - Micheal Nielsen Example | python|numpy|neural-network|mnist | 0 | 58 | 1 | 72,847,613 | 72,847,613 | 0 | true | 2022-07-01T10:39:34.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MNIST Neural Network not learning - Micheal Nielsen Example<p>I have been trying to code up the neural network for recognizing MNIST that was given by Michae... |
72,851,823 | Problem returning an input value within a while loop in Python<p>I have a question with my code in Python. I want to return a value for the Input.input_pos() function within this class.
if I type one of the conditional values when I am asked to input while running the program, it returns correctly, but if I input somet... | <p>Try using while to reassign the value until the input is successful and then the loop will jump out and return</p>
<pre><code>class Input:
def input_pos(self):
postura = input("Postura: ")
while postura not in ["6", "7", "8", "9", "10"... | Problem returning an input value within a while loop in Python | python|class|while-loop|return-value | 0 | 58 | 2 | 72,852,323 | 72,852,323 | 0 | true | 2022-07-04T04:38:20.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem returning an input value within a while loop in Python<p>I have a question with my code in Python. I want to return a value for the Input.input_pos()... |
72,828,037 | Translate "-d" in VBA when doing an HTTP Request<p>I try to get a list of actions from iAuditor filtered by "template_id" by sending an HTTP Request with VBA. For the moment I have this code that return the list of all actions:</p>
<pre><code>Sub Get_Data()
Dim hReq As Object
Dim sht As Worksheet
Dim authKey ... | <p>I've did it !!! :D</p>
<p>Here is my final code:</p>
<pre><code>Sub Get_Data()
Dim hReq As Object
Dim sht As Worksheet
Dim authKey As String
Dim response As String
Dim response_objet As Object
Dim Body As String
authKey = "d8a0df7d7e19XXXXXXXXXXXXXXXXc65ec9eff3c765cf2fcf"
Body = "{ ""filte... | Translate "-d" in VBA when doing an HTTP Request | vba|filter|xmlhttprequest|http-headers | 1 | 58 | 2 | 72,853,664 | 72,853,664 | 0 | true | 2022-07-01T10:40:11.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Translate "-d" in VBA when doing an HTTP Request<p>I try to get a list of actions from iAuditor filtered by "template_id" by sending an HTTP Reques... |
72,859,465 | How can I change " " to ' ' in XmlDocument C#?<p>Currently, I have a code project to convert data from excel to xml and I am using XmlDocument to write xml file to run testcase in available software. But in that software when running xml it only receives.</p>
<p><code><?xml version='1.0' encoding='utf-8'?></code>... | <p>You have a couple of issues here:</p>
<ol>
<li><p>There is no need to manually add an XML Declaration to an <a href="https://docs.microsoft.com/en-us/dotnet/api/system.xml.xmldocument" rel="nofollow noreferrer"><code>XmlDocument</code></a> by calling <a href="https://docs.microsoft.com/en-us/dotnet/api/system.xml.xm... | How can I change " " to ' ' in XmlDocument C#? | c#|excel|xml|linq|xmldocument | 1 | 58 | 1 | 72,862,992 | 72,862,992 | 0 | true | 2022-07-04T16:05:37.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I change " " to ' ' in XmlDocument C#?<p>Currently, I have a code project to convert data from excel to xml and I am using XmlDocument to write xml f... |
72,830,073 | Different time sysdate and current_date when connect to database since application server<p>I have a problem with the time that Oracle gives me when working with applications.</p>
<p>I currently connect from an application server (apx1) to a server containing Oracle 19c (bdx1) for database operations.</p>
<p>Both the a... | <p>The solution was posted on DBA stackexchange: <a href="https://dba.stackexchange.com/a/314026/175060">https://dba.stackexchange.com/a/314026/175060</a>.</p>
<p>You have to set the parameter at cluster level:</p>
<pre class="lang-bash prettyprint-override"><code>srvctl setenv database -db DBNAME -env "TZ=Atlanti... | Different time sysdate and current_date when connect to database since application server | oracle|unix | 0 | 58 | 2 | 72,872,498 | 72,872,498 | 0 | true | 2022-07-01T13:32:05.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Different time sysdate and current_date when connect to database since application server<p>I have a problem with the time that Oracle gives me when working ... |
72,877,565 | Failed to run php spark serve, can anyone solve the problem?<p>The error I receive when starting spark is</p>
<pre><code>Constant FILTER_SANITIZE_STRING is deprecated
</code></pre>
<p>can anyone solve the problem?</p>
<p><a href="https://i.stack.imgur.com/gF3QD.png" rel="nofollow noreferrer"><img src="https://i.stack.i... | <p>You're using a PHP version that is too new for the codeigniter version you installed.</p>
<p>If you're using PHP 8.1 you need at least codeigniter 4.1.7</p>
<p>Solutions:</p>
<ul>
<li>Option1: Downgrade PHP</li>
<li>Option2: Upgrade Codeigniter</li>
</ul>
<p>Reference: <a href="https://codeigniter.com/user_guide/cha... | Failed to run php spark serve, can anyone solve the problem? | php|codeigniter | 0 | 58 | 1 | 72,877,587 | 72,877,587 | 0 | true | 2022-07-06T03:11:59.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Failed to run php spark serve, can anyone solve the problem?<p>The error I receive when starting spark is</p>
<pre><code>Constant FILTER_SANITIZE_STRING is d... |
72,877,547 | GitHub action yaml formatting<p>I'm trying to make GitHub CI</p>
<p>What's wrong with this formatting?
I have such a problem</p>
<blockquote>
<p>Invalid workflow file
You have an error in your yaml syntax on line 8</p>
</blockquote>
<p><a href="https://i.stack.imgur.com/FQo4e.png" rel="nofollow noreferrer">screenshot o... | <p>There are some indentation and syntax issue. Please find the correct code below. Here you can find a sample run. <a href="https://github.com/heyitsvajid/react-starter-kit/runs/7208178990?check_suite_focus=true" rel="nofollow noreferrer">Link</a></p>
<pre><code>name: Test CI
on:
push:
branches: [main]
pull_re... | GitHub action yaml formatting | yaml|formatting|github-actions | 0 | 58 | 1 | 72,877,883 | 72,877,883 | 0 | true | 2022-07-06T03:08:33.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GitHub action yaml formatting<p>I'm trying to make GitHub CI</p>
<p>What's wrong with this formatting?
I have such a problem</p>
<blockquote>
<p>Invalid work... |
72,877,326 | Improve Performance of Yahoo Finance Info on each stock<p>Im getting the list of all S&P 500 stocks and then storing each stocks info which contains a lot of financial information about 170 columns per stock in a dataframe the code is very slow and I was wondering if it could be improved.</p>
<pre><code>import pand... | <p>You cannot improve this because, for each ticker you are recieving 155 columns:</p>
<pre><code>metricList = []
for t in small:
metricList.append(pd.DataFrame([yf.Ticker(t).info]))
df = pd.concat(metricList)
</code></pre>
<p>which is (for the first five tickers):</p>
<pre><code> zip sector ... | Improve Performance of Yahoo Finance Info on each stock | python|pandas|yfinance | 0 | 58 | 1 | 72,881,201 | 72,881,201 | 0 | true | 2022-07-06T02:27:13.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Improve Performance of Yahoo Finance Info on each stock<p>Im getting the list of all S&P 500 stocks and then storing each stocks info which contains a lo... |
72,881,214 | error TS2769: No overload matches this call. ANGULAR<p>can't understand where is the problem on this typescript code.</p>
<p>error on line 5 ".subscribe((response: { Token: string }) => {"</p>
<pre><code>login() {
this.httpClient
.post('http://localhost:4000/signin', this.loginForm.value)
.subscribe((r... | <p>That's because of type only string (read comment)</p>
<pre><code>login() {
this.httpClient
.post('http://localhost:4000/signin', this.loginForm.value)
.subscribe((response: { Token: string }) => {
// Here you're declaring Token as string but then your checking if it's undefined and for typescript ... | error TS2769: No overload matches this call. ANGULAR | angular|typescript | 1 | 58 | 2 | 72,881,302 | 72,881,302 | 0 | true | 2022-07-06T09:40:40.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
error TS2769: No overload matches this call. ANGULAR<p>can't understand where is the problem on this typescript code.</p>
<p>error on line 5 ".subscribe... |
72,881,994 | How do I get the beginning of a string in Python?<p>So... I tried to get what my string starts with and I tried to see if I can get what my string starts with, with the <code>startswith</code> function. But as I'm trying to use <code>startswith</code> function it just returning True or False.
This is how I tried:</p>
<... | <p>To add to the above answers, if you want the first word you can use str1.split(" ").</p>
<p>e.g.</p>
<pre><code>str1 = "sdf fds dfs"
str1 = str1.split(" ")
print(str1[0])
</code></pre>
<p>prints sdf</p> | How do I get the beginning of a string in Python? | python|string|startswith | -2 | 58 | 4 | 72,882,042 | 72,882,042 | 0 | true | 2022-07-06T10:33:37.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get the beginning of a string in Python?<p>So... I tried to get what my string starts with and I tried to see if I can get what my string starts wit... |
72,886,215 | Ansible to print the variable value having another variable inside it<p>In a.yml file, I have stored data like below</p>
<pre><code>---
Server:
"Node1" : ["Node1", "Owner1", "ID1"]
"Node2" : ["Node2", "Owner2", "ID2"]
</code></pre>
<... | <p>You never nest <code>{{...}}</code> markers.</p>
<p>Recall that to access a nested variable. the syntax <code>Server.Node1</code> is exactly equivalent to <code>Server["Node1"]</code>. The second syntax allows us to make use of variables (and string interpolation) on the key, so we can write:</p>
<pre><cod... | Ansible to print the variable value having another variable inside it | ansible | 0 | 58 | 1 | 72,886,327 | 72,886,327 | 0 | true | 2022-07-06T15:26:41.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ansible to print the variable value having another variable inside it<p>In a.yml file, I have stored data like below</p>
<pre><code>---
Server:
"Nod... |
72,894,600 | Laravel with Docker "laravel.log" could not be opened in append mode: Failed to open stream: Permission denied<p>Suddenly I started to get this error, and I cannot work on the app at all. Once the error got fixed by itself, but now that I opened the project today, I started to get it again.</p>
<p>I tried changing the ... | <p>Answer:</p>
<p><code>chown -R www-data storage</code></p>
<ul>
<li>Make www-data the owner.</li>
</ul> | Laravel with Docker "laravel.log" could not be opened in append mode: Failed to open stream: Permission denied | laravel|docker | 0 | 58 | 1 | 72,895,099 | 72,895,099 | 0 | true | 2022-07-07T08:29:03.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel with Docker "laravel.log" could not be opened in append mode: Failed to open stream: Permission denied<p>Suddenly I started to get this error, and I ... |
72,889,397 | C# RSACryptoServiceProvider export key as SPKI/DER<p>I want to have the equivalent to this javascript code</p>
<pre><code>const rsaKeyPair = crypto.generateKeyPairSync('rsa', {
modulusLength: 2048
});
const publicKey = rsaKeyPair.publicKey.export({
type: 'spki',
format: 'der'
});
</code></pre>
<p>but i am u... | <p>Thanks i managed to do it with <code>RSA.Create(2048)</code> and <code>ExportSubjectPublicKeyInfo()</code></p>
<pre><code>RSA rsa = RSA.Create(2048);
rsa.ExportSubjectPublicKeyInfo();
</code></pre> | C# RSACryptoServiceProvider export key as SPKI/DER | c#|cryptography | 1 | 58 | 1 | 72,895,328 | 72,895,328 | 0 | true | 2022-07-06T20:17:35.047Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# RSACryptoServiceProvider export key as SPKI/DER<p>I want to have the equivalent to this javascript code</p>
<pre><code>const rsaKeyPair = crypto.generateK... |
72,894,529 | How to make 2 AD tenants authenticate between each other?<p>I am a service provider which develops PBI reports to multiple clients.
I manage the PBI account and tenants for my clients. For each client I create a new tenant which I manage for them. In this tenants I keep all the PBI fils (PBIX), reports and datasets.
If... | <p><em><strong>You can make use of Azure AD B2B collaboration to achieve your scenario.</strong></em></p>
<blockquote>
<p><strong><a href="https://docs.microsoft.com/en-us/azure/active-directory/external-identities/what-is-b2b" rel="nofollow noreferrer">Azure AD B2B collaboration</a> enables users to use one set of cr... | How to make 2 AD tenants authenticate between each other? | azure-active-directory|multi-tenant | 0 | 58 | 1 | 72,895,379 | 72,895,379 | 0 | true | 2022-07-07T08:23:35.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make 2 AD tenants authenticate between each other?<p>I am a service provider which develops PBI reports to multiple clients.
I manage the PBI account ... |
72,895,285 | "echo password | sudo -S" with exclamation mark<p>What I want to do is</p>
<blockquote>
<p>$ echo password!p | sudo -S [command]</p>
</blockquote>
<p>in a linux terminal (in my case, ubuntu20.04). If you type it as it is, the exclamation mark will refer to the history of the command line, and if !p=pwd, it will be a st... | <p>Could try turning off history expansion.</p>
<pre><code>set +o histexpand
echo -n "password!p" | sudo -S command
set -o histexpand # if you want to restore the capability after
</code></pre> | "echo password | sudo -S" with exclamation mark | linux|bash|passwords|echo | -1 | 58 | 1 | 72,900,667 | 72,900,667 | 0 | true | 2022-07-07T09:19:57.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
"echo password | sudo -S" with exclamation mark<p>What I want to do is</p>
<blockquote>
<p>$ echo password!p | sudo -S [command]</p>
</blockquote>
<p>in a li... |
72,897,092 | get output from module called in a loop in bicep<p>How can I retrieve the output variable from a module called in a loop?
I like to add subnets in the next step to the vnet.</p>
<p>Main.bicep</p>
<pre><code>module vnet01 'vNet.bicep' = [ for vnet in vnets : {
name: vnet.name
scope: virtualNetworkRg
... | <p>You could always loop through <code>vnet01</code> (as it is an array):</p>
<pre><code>module vnet01 'vNet.bicep' = [for vnet in vnets: {
name: vnet.name
...
}]
output vnetIds array = [for i in range(0, length(vnets)): {
id: vnet01[i].outputs.id
}]
</code></pre> | get output from module called in a loop in bicep | azure|azure-resource-manager|azure-bicep | 0 | 58 | 1 | 72,903,810 | 72,903,810 | 0 | true | 2022-07-07T11:34:31.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
get output from module called in a loop in bicep<p>How can I retrieve the output variable from a module called in a loop?
I like to add subnets in the next s... |
72,913,235 | Transfer Eth through smart contract to other account?<p>In the below code eth will be transferred in the form of Wei by default, but I want the amount will transfer in the form of Ether, how can I do that?</p>
<pre><code>function (uint amount) public payable {
someaddress.transfer(amount);
}
</code></pre> | <p>Wei is the smallest unit of Ether, specifically 1 ETH == 1,000,000,000,000,000,000 (or 1e18) wei.</p>
<p>The <code>transfer()</code> function always accepts the amount in wei. So if you want to pass just <code>1</code> as the input param, meaning that you want to send 1 full ETH, you can multiply the value by 1e18 e... | Transfer Eth through smart contract to other account? | smartcontracts|transfer|ether | 0 | 58 | 1 | 72,915,544 | 72,915,544 | 0 | true | 2022-07-08T14:51:40.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transfer Eth through smart contract to other account?<p>In the below code eth will be transferred in the form of Wei by default, but I want the amount will t... |
72,916,237 | Spring Boot Authentication succeeds with embedded Tomcat, but returns 403 with Open/WAS Liberty<p>I use Spring Security to authenticate/authorize against Active Directory. Below code works just fine if I run it in Spring embedded Tomcat.</p>
<p>But when I switch to Open/WAS Liberty server, I get 403 on authenticate (/... | <p>The reason I was experiencing this was that in my Liberty server.xml, I was missing defined <code>context-path</code>. As it looks like, Liberty does not consider <code>context-path</code> set up in your <strong>application.properties</strong> file.</p>
<p>Below is the <code>context-path</code> I have in my <strong... | Spring Boot Authentication succeeds with embedded Tomcat, but returns 403 with Open/WAS Liberty | spring-boot|tomcat|spring-security|open-liberty | 0 | 58 | 1 | 72,924,004 | 72,924,004 | 0 | true | 2022-07-08T19:38:14.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring Boot Authentication succeeds with embedded Tomcat, but returns 403 with Open/WAS Liberty<p>I use Spring Security to authenticate/authorize against Act... |
72,929,307 | How to count the occurrences of a value in a data frame?<p>I have a data frame [df] that looks like this but much lagger:</p>
<pre><code>title of the novel author publishing year mentionned cities
0 Beasts and creatures Bruno Ivory 2021 New York
0 Monsters ... | <p>Perhaps you could use a for loop to iterate through the 'mentioned cities' column, and use a dict to count the occurrences of cities:</p>
<pre class="lang-py prettyprint-override"><code>city_count = {}
count_column = []
for city in df['mentionned cities']:
city_count[city] = city_count.get(city, 0) + 1
count... | How to count the occurrences of a value in a data frame? | python|pandas | 0 | 58 | 3 | 72,929,741 | 72,929,741 | 0 | true | 2022-07-10T14:40:06.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to count the occurrences of a value in a data frame?<p>I have a data frame [df] that looks like this but much lagger:</p>
<pre><code>title of the novel ... |
72,796,490 | how to set kotlin version for gradle runtime?<p><strong>Background Info:</strong></p>
<p>I am using jetpack compose for android developing and for some reason I CANNOT use gradle 7+. Currently I tried gradle 6.7.1 but it says</p>
<pre><code>./gradlew -v
-----------------------------------... | <p>Thanks to my workmate and we found answer from apg codes and verified it from google developer web.</p>
<p>Well, as the answer found on <a href="https://developer.android.com/jetpack/androidx/releases/compose-kotlin" rel="nofollow noreferrer">https://developer.android.com/jetpack/androidx/releases/compose-kotlin</a>... | how to set kotlin version for gradle runtime? | android|kotlin|gradle | 0 | 58 | 2 | 72,933,097 | 72,933,097 | 0 | true | 2022-06-29T06:03:40.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to set kotlin version for gradle runtime?<p><strong>Background Info:</strong></p>
<p>I am using jetpack compose for android developing and for some reaso... |
72,933,279 | Apache Karaf 4.2.3 update ActiveMQ version<p>I'm using Karaf 4.2.3 over JDK 1.8. I had ran a Black Duck Scan, and it is pointing to <code>Apache ActiveMQ -5.15.9</code> with some vulnerabilities, one of them is critical. I'd like to know if it is possible to get this updated to the recommended version which is 5.17.1. ... | <p>ActiveMQ 5.17.1 requires Java 11 so you won't be able to use that. You should upgrade to ActiveMQ 5.16.5 instead. It's the latest version which supports Java 8. That said, if you're not using ActiveMQ in your project then the simplest (and most secure) thing you can do is just remove it.</p> | Apache Karaf 4.2.3 update ActiveMQ version | activemq|apache-karaf|apache-karaf-feature | 0 | 58 | 1 | 72,933,421 | 72,933,421 | 0 | true | 2022-07-11T02:55:05.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apache Karaf 4.2.3 update ActiveMQ version<p>I'm using Karaf 4.2.3 over JDK 1.8. I had ran a Black Duck Scan, and it is pointing to <code>Apache ActiveMQ -5.... |
72,934,200 | How to insert in a nested hashmap?<p>I have a nested hashmap like</p>
<pre><code>HashMap<String,HashMap<String,Obzect>> map1= new HashMap<>();
</code></pre>
<p>The first map key will be <code>object.getId</code> and key of second map can be "p1","p2" or such based on some condition... | <p>Try this.</p>
<pre><code>public static void main(String[] args) {
record Obzect(String getId) {}
Obzect object = new Obzect("id");
HashMap<String, HashMap<String, Obzect>> map1= new HashMap<>();
map1.computeIfAbsent(object.getId, k -> new HashMap<>()).put("p... | How to insert in a nested hashmap? | java|dictionary|nested|hashmap | -1 | 58 | 1 | 72,934,322 | 72,934,322 | 0 | true | 2022-07-11T05:48:10.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to insert in a nested hashmap?<p>I have a nested hashmap like</p>
<pre><code>HashMap<String,HashMap<String,Obzect>> map1= new HashMap<>... |
72,935,763 | responsive design resize problem - flutter<pre class="lang-dart prettyprint-override"><code>Widget myPost(double screenH, BuildContext context, double screenW) {
String sampleSrc =
"https://images.unsplash.com/photo-1475924156734-496f6cac6ec1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVu... | <p>The overall height on shrink is greater than <code>height: screenH * 0.1,</code> you can include extra pixels like <code>height: 10+ (screenH * 0.1)</code> But you can just include fixed height here. Like on item, you can choose minimum fixed height like 64, and you don't to have to worry about making larger. You ... | responsive design resize problem - flutter | flutter|dart|flutter-layout | 0 | 58 | 1 | 72,935,940 | 72,935,940 | 0 | true | 2022-07-11T08:38:03.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
responsive design resize problem - flutter<pre class="lang-dart prettyprint-override"><code>Widget myPost(double screenH, BuildContext context, double screen... |
72,938,281 | It is not accepted to change the value in the Dropdown in the bottom sheet?<p><strong>Flutter</strong> . It is not accepted to change the value in the <strong>Dropdown</strong> in the <strong>bottom sheet</strong> ?</p>
<p>I made all the changes and it <strong>didn't</strong> work !</p>
<p>Knowing that on a normal scre... | <p>From the code i see you are not using the StatefulBuilder which will rebuild the sheet and change your value. From the code that you provided i have just created and example for you which might help you.</p>
<pre><code>import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:m... | It is not accepted to change the value in the Dropdown in the bottom sheet? | flutter|flutter-layout|flutter-dependencies|flutter-test | 0 | 58 | 1 | 72,938,445 | 72,938,445 | 0 | true | 2022-07-11T12:02:34.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
It is not accepted to change the value in the Dropdown in the bottom sheet?<p><strong>Flutter</strong> . It is not accepted to change the value in the <stron... |
72,856,471 | GoLang How to load nested objects using GORM<p>Hi let's say that I have 3 Structs in the following format</p>
<pre><code>type Employee struct {
Id int
Name string
CompanyId int `gorm:"column:companyId"`
Company Company `gorm:"foreignKey:CompanyId"`
}
type Company struct {
Id int
Company... | <p>this is what I found as a solution to load the nested objects from embedded structs</p>
<pre class="lang-js prettyprint-override"><code>db.Preload("Company").Preload("Company.Owner").Find(&Employees)
</code></pre> | GoLang How to load nested objects using GORM | mysql|go|go-gorm | 1 | 58 | 2 | 72,939,224 | 72,939,224 | 0 | true | 2022-07-04T12:06:27.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GoLang How to load nested objects using GORM<p>Hi let's say that I have 3 Structs in the following format</p>
<pre><code>type Employee struct {
Id int
Na... |
72,940,105 | How to resolve ModuleNoteFoundError in jupyter notebook?<p>I have created a new conda environment as such:</p>
<pre><code>conda create -c conda-forge -n pymc3_env pymc3 theano-pymc mkl mkl-service
</code></pre>
<p>afterwards, I added it to my jupyter kernel as such:</p>
<pre><code>python -m ipykernel install --user --n... | <p>Very likely you did not have the correct environment activated when registering the kernel. The kernel name is arbitrary, so just because it has the same name as the environment doesn't entail it corresponding to the environment.</p>
<p>Make sure the environment is activated and has <code>ipykernel</code> installed,... | How to resolve ModuleNoteFoundError in jupyter notebook? | python|jupyter-notebook|jupyter|conda | 0 | 58 | 1 | 72,941,588 | 72,941,588 | 0 | true | 2022-07-11T14:24:20.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to resolve ModuleNoteFoundError in jupyter notebook?<p>I have created a new conda environment as such:</p>
<pre><code>conda create -c conda-forge -n pymc... |
72,941,529 | Webpack Dev Server stops on error originated in postcss-loader<p>I'm using <code>webpack-dev-server</code> for development but after upgrading to <code>webpack 5</code> it just stops when <code>postcss-loader</code> can't parse css file.</p>
<p>I start dev server via <code>npx webpack-dev-server</code> and when I start... | <p>Turned out to be an issue in postcss. Updating postcss-loader to <code>7.0.1</code> fixed the issue.</p>
<p><a href="https://github.com/webpack/webpack-dev-server/issues/4514" rel="nofollow noreferrer">https://github.com/webpack/webpack-dev-server/issues/4514</a></p> | Webpack Dev Server stops on error originated in postcss-loader | css|reactjs|webpack|webpack-dev-server|postcss-loader | 0 | 58 | 1 | 72,942,221 | 72,942,221 | 0 | true | 2022-07-11T16:10:02.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Webpack Dev Server stops on error originated in postcss-loader<p>I'm using <code>webpack-dev-server</code> for development but after upgrading to <code>webpa... |
72,935,018 | How to write a Cordova plugin with SwiftUI<p>I am writing a QR code scanning cordova iOS plugin. I want to use <a href="https://github.com/twostraws/CodeScanner/tree/main/Sources/CodeScanner" rel="nofollow noreferrer">this swift package</a>.</p>
<p>Right now I am experimenting by editing the code from <a href="https://... | <p>After some research I found this to work:</p>
<pre class="lang-swift prettyprint-override"><code>
import SwiftUI
import UIKit
@available(iOS 13.0, *)
@objc(ModusEchoSwift) class ModusEchoSwift : CDVPlugin {
var hostingViewController = UIHostingController(rootView: ExampleView())
@objc(echo:)
func echo(comma... | How to write a Cordova plugin with SwiftUI | swift|cordova|swiftui|cordova-plugins|qr-code | 0 | 58 | 1 | 72,943,386 | 72,943,386 | 0 | true | 2022-07-11T07:25:20.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write a Cordova plugin with SwiftUI<p>I am writing a QR code scanning cordova iOS plugin. I want to use <a href="https://github.com/twostraws/CodeScan... |
72,943,472 | Function returning the wrong kth value while using sets<p>I was attempting to solve this question on some website where you have the find the kth smallest value in c++ so I came up with:</p>
<pre><code>#include <bits/stdc++.h>
using namespace std;
int kthSmallest(int arr[], int l, int r, int k) {
// l is the... | <p>The 2nd argument of <a href="https://en.cppreference.com/w/cpp/container/set/set" rel="nofollow noreferrer">the constructor of <code>std::set</code></a> should be an iterator for an element next to the last element, not one for the last element.</p>
<p>Therefore, you are operating with a set whose members are <code>... | Function returning the wrong kth value while using sets | c++|arrays|algorithm|sorting|set | -2 | 58 | 2 | 72,943,521 | 72,943,521 | 0 | true | 2022-07-11T19:06:09.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Function returning the wrong kth value while using sets<p>I was attempting to solve this question on some website where you have the find the kth smallest va... |
72,940,615 | React - Formik as select wont render select options generated by loop<p>I am working with a register form and right now I want to make sure that the user writes in their date of birth.</p>
<p>At the moment, I am using loop generated values.
I want to make sure the user is at least 18 years of age.
To do this, I made a ... | <p>It appears the solution to the issue was fairly simple.</p>
<p>in the formik select</p>
<pre><code><SelectField field="year" optionValue="" optionLabel="Year">
<>
{allYears.map((year, index) =>
<option key={index} value={year.value}>{year.... | React - Formik as select wont render select options generated by loop | reactjs|loops|arraylist|formik|react-typescript | 0 | 58 | 1 | 72,944,525 | 72,944,525 | 0 | true | 2022-07-11T15:01:18.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React - Formik as select wont render select options generated by loop<p>I am working with a register form and right now I want to make sure that the user wri... |
72,948,255 | Using class as type in TypeScript<p>Why can I use class as type in TypeScript, like <code>word: Word</code> in the code below?</p>
<pre class="lang-js prettyprint-override"><code>class Dict {
private words: Words = {};
// I wonder about this line
add(word: Word) {
if (!this.words[word.term]) {
this.words[... | <p>You can do this in most statically typed languages. By annotating word with <code>Word</code> you can access its class properties.</p>
<p>More info:
<a href="https://www.tutorialsteacher.com/typescript/typescript-class" rel="nofollow noreferrer">https://www.tutorialsteacher.com/typescript/typescript-class</a></p> | Using class as type in TypeScript | javascript|typescript | -3 | 58 | 1 | 72,948,357 | 72,948,357 | 0 | true | 2022-07-12T07:02:06.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using class as type in TypeScript<p>Why can I use class as type in TypeScript, like <code>word: Word</code> in the code below?</p>
<pre class="lang-js pretty... |
72,900,417 | Random function makes component change on click<p>I am creating a "Pinterest" view in an Angular app. I want each tile to have a random height from 250px to 450px with a 50px step for each possible height. The problem I have is each time i click on the list of tiles (CardComponent), the function <code>randomS... | <p>Calling a method from a template is always a bad idea in general (because Angular cannot predict whether the return value of the method has changed), and in the case where the function is not pure, we can not resolve the problem with <code>ChangeDetectionStrategy.OnPush</code> and <code>Pipe</code>, so I can suggest... | Random function makes component change on click | angular|typescript|random|gridview|pinterest | 0 | 58 | 1 | 72,949,231 | 72,949,231 | 0 | true | 2022-07-07T15:20:12.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Random function makes component change on click<p>I am creating a "Pinterest" view in an Angular app. I want each tile to have a random height from... |
72,952,085 | What is the fastest way to play sound after pressing a button on flutter?<p>I don't know much about Flutter. I don't know how to play a sound the fastest. The fastest method I've tried has a delay of 250 milliseconds. All I want to do is have a button make a sound. I guess what I need to do is to cache the audio, but I... | <p>Here's what to do with help from mortiz's answer:</p>
<p>pubspec.yaml, import required class:</p>
<pre><code>dependencies:
audioplayers: ^0.20.1 # Not "1.0.1". Because audioplayers/audio_cache.dart does not exist.
</code></pre>
<p>import required class:</p>
<pre><code>import 'package:audioplayers/aud... | What is the fastest way to play sound after pressing a button on flutter? | flutter|dart | 0 | 58 | 3 | 72,953,609 | 72,953,609 | 0 | true | 2022-07-12T12:10:02.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the fastest way to play sound after pressing a button on flutter?<p>I don't know much about Flutter. I don't know how to play a sound the fastest. Th... |
72,954,473 | How to get API to output one parameter in JSON<p>I'm trying to withdraw all the tasks from a specific project within Todoist using <a href="https://developer.todoist.com/rest/v1/#overview" rel="nofollow noreferrer">their API</a> and Python.</p>
<p>My code looks like this:</p>
<pre class="lang-py prettyprint-override"><... | <p>According to documentation, <code>get_tasks</code> method returns a list of Task object, so if you need to store just <code>content</code> property for each of them, you can change your code like this:</p>
<pre><code>data = [t.content for t in api.get_tasks(project_id = 1234567899,)]
with open('outputa.txt', 'w', en... | How to get API to output one parameter in JSON | python|todoist | 0 | 58 | 1 | 72,954,620 | 72,954,620 | 0 | true | 2022-07-12T15:03:55.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get API to output one parameter in JSON<p>I'm trying to withdraw all the tasks from a specific project within Todoist using <a href="https://developer... |
72,960,680 | How to join all_tab_columns + all_cons_columns + all_constraints in Oracle<p>Creating this table:</p>
<pre class="lang-sql prettyprint-override"><code>CREATE SEQUENCE my_seq;
CREATE TABLE mytable (
id NUMBER(10) DEFAULT my_seq.nextval PRIMARY KEY,
name VARCHAR2(10) NOT NULL,
version FLOAT,
active CHAR,... | <p>Fixed my issue:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT at.column_name, ac.constraint_name, cc.constraint_type, cc.generated
FROM all_tab_columns at
LEFT JOIN all_cons_columns ac
ON (at.owner = ac.owner
AND at.table_name = ac.table_name
AND at.column_name = ac.column_name)
LEFT JOIN a... | How to join all_tab_columns + all_cons_columns + all_constraints in Oracle | sql|database|oracle|left-join | -1 | 58 | 2 | 72,961,179 | 72,961,179 | 0 | true | 2022-07-13T03:43:42.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to join all_tab_columns + all_cons_columns + all_constraints in Oracle<p>Creating this table:</p>
<pre class="lang-sql prettyprint-override"><code>CREATE... |
72,962,449 | Reflection Methodinfo - how to use remove for a reflected property (List)<p>My goal is to remove entries from unknown list / collection at compile time.</p>
<p>I'm passing an interface as parameter. With reflection I receive the associated collection and method "Remove".</p>
<pre><code>private void DeleteRowO... | <p>Thanks to Lasse who pointed to a mistake in code. Passing a new instance of a class instead of the parameter uiModel object.</p>
<pre><code>methodRemoveOfCollection.Invoke(instanceOfCollection, new [] { uiModel } );
</code></pre>
<p>Now it works properly!</p> | Reflection Methodinfo - how to use remove for a reflected property (List) | c#|list|reflection|methodinfo | 0 | 58 | 1 | 72,962,590 | 72,962,590 | 0 | true | 2022-07-13T07:29:35.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reflection Methodinfo - how to use remove for a reflected property (List)<p>My goal is to remove entries from unknown list / collection at compile time.</p>
... |
72,957,104 | Python ElementTree - getting element with specific attribute<p>I have some XML where each element has slightly different attributes. I only want to pull the element with the population attribute. The below code works. However, if I uncomment the population assignment and print at the bottom, it fails because the popula... | <p>In the code you are looking for <code>country</code> elements with a <code>population</code> attribute, but there are no such elements.</p>
<p>To get any element with a <code>population</code> attribute, you can use a wildcard for the element name:</p>
<pre><code>for target in root.findall('.//*[@population]'):
... | Python ElementTree - getting element with specific attribute | python|xml|elementtree | 0 | 58 | 1 | 72,962,609 | 72,962,609 | 0 | true | 2022-07-12T18:52:16.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python ElementTree - getting element with specific attribute<p>I have some XML where each element has slightly different attributes. I only want to pull the ... |
72,956,115 | List.of() method not found in spring boot application error<ol>
<li>I checked all imports they are correct the only error I am getting is while calling the <code>List.of()</code> method.</li>
</ol>
<pre class="lang-java prettyprint-override"><code>UserDao user1 = new UserDao();
user1.setName("j");
user1.setUs... | <p>You should upgrade to Java9 to use <code>List.of</code> function, or use <code>Arrays.asList</code> instead.</p> | List.of() method not found in spring boot application error | java|spring|spring-boot | 0 | 58 | 3 | 72,965,655 | 72,965,655 | 0 | true | 2022-07-12T17:17:48.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
List.of() method not found in spring boot application error<ol>
<li>I checked all imports they are correct the only error I am getting is while calling the <... |
72,790,831 | Problems with theano when trying to use pymc3<p>I have been trying to use the pymc3 package but have constantly been receiving errors. First off, when I import the pymc3 package, here is what happens:</p>
<pre><code>import pymc3 as pm
</code></pre>
<blockquote>
<p>WARNING (theano.configdefaults): g++ not detected ! The... | <p>I was able to replicate the issue in PyMC3. This appears to be something wrong with the SMC sampler when combined with multiprocessing. Changing to <code>parallel=False</code> will get the SMC sampler working. Changing to NUTS or Metropolis sampling will also work fine.</p>
<p>Please file a bug report on <a href="ht... | Problems with theano when trying to use pymc3 | python|conda|pymc3 | 1 | 58 | 1 | 72,970,490 | 72,970,490 | 0 | true | 2022-06-28T17:28:17.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problems with theano when trying to use pymc3<p>I have been trying to use the pymc3 package but have constantly been receiving errors. First off, when I impo... |
72,971,407 | Can I access my website from Django admin panel?<p>I am trying to develop a website where I can see the homepage as it is from Django admin panel. The reason I want that is I want to edit the name of the static content like 'Home' to 'All' along with the change of slide show picture. In summary, I want to change the we... | <p>Static texts you can change in admin panel with different modules:
for example <code>django-rosetta</code> or my own library <code>Django-tof</code>. <a href="https://github.com/wP-soft-GmbH/django-tof" rel="nofollow noreferrer">https://github.com/wP-soft-GmbH/django-tof</a></p>
<p>But in your case, i think, you wan... | Can I access my website from Django admin panel? | django|django-admin | 0 | 58 | 1 | 72,973,157 | 72,973,157 | 0 | true | 2022-07-13T19:05:52.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I access my website from Django admin panel?<p>I am trying to develop a website where I can see the homepage as it is from Django admin panel. The reason... |
72,973,542 | How to identify and rename duplicate values using numbers in PHP array?<p>I have a PHP array as below :</p>
<pre><code>Array
(
[0] => QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)
[1] => Microsoft Network Adapter Multiplexor Driver
[2] => QLogic BCM57810 10 Gigabit Ethernet (NDIS VB... | <p>This should do the trick:</p>
<pre><code>$originalArray = array(
"QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)",
"Microsoft Network Adapter Multiplexor Driver",
"Microsoft Network Adapter Multiplexor Driver Simplified",
"QLogic BCM57810 10 Gigabit Ethernet (NDIS VB... | How to identify and rename duplicate values using numbers in PHP array? | php|arrays|sorting|rename | 0 | 58 | 2 | 72,973,913 | 72,973,913 | 0 | true | 2022-07-13T23:03:25.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to identify and rename duplicate values using numbers in PHP array?<p>I have a PHP array as below :</p>
<pre><code>Array
(
[0] => QLogic BCM5781... |
72,973,920 | How do I fix my c# script that has suddenly stopped working?<p>I'm trying to make a 2d platforming game using Unity game engine, and I've run into an issue with my code. One of the game's core mechanics is a shield the player has most of the time, and previously I was able to change the position of this shield using th... | <p>There are some tips I can give you to find the problem:
Check that no other scripts are checking the position of the shield.
You wrote the LowerShield () and RaiseShield () functions, but they both check if the player's localScale property is -1. This shouldn't be possible, because the scale of a GameObject must be ... | How do I fix my c# script that has suddenly stopped working? | c#|unity3d | 0 | 58 | 1 | 72,974,703 | 72,974,703 | 0 | true | 2022-07-14T00:11:18.573Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I fix my c# script that has suddenly stopped working?<p>I'm trying to make a 2d platforming game using Unity game engine, and I've run into an issue w... |
72,976,005 | Unable to pass data from a Parent'state to a Child's state in React<p>I am trying to pass an Array of values from a Parent module to a Child module, and set them in the Child's state in order to display a chart.</p>
<p>Here is my Parent module:</p>
<pre><code>class Parent extends Component {
constructor(props) {
... | <p>Your Child component does not get its state updated because the lifecycle function you are using does not get called when the component gets an updated set of props from the Parent.</p>
<p>Please check the <code>Updating</code> heading on <a href="https://www.w3schools.com/react/react_lifecycle.asp" rel="nofollow no... | Unable to pass data from a Parent'state to a Child's state in React | reactjs | 0 | 58 | 1 | 72,976,336 | 72,976,336 | 0 | true | 2022-07-14T06:17:15.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to pass data from a Parent'state to a Child's state in React<p>I am trying to pass an Array of values from a Parent module to a Child module, and set ... |
72,980,706 | c++: is it better to have a global variable or create a local variable?<p>for example i have a library function which needs to be used for validating signatures,and is only called when requested.</p>
<p>lets say i have a library class to verify signature
sigverify.hpp</p>
<pre><code>class SigVerify
{
bool verifySignatu... | <p>Consider a third option mentioned in comments:</p>
<pre><code>void ServiceClass::makeLibCall()
{
static Sigverify m_sigVerify;
bool result = m_sigVerify.verifySignautre(path);
}
</code></pre>
<p><code>m_sigVerify</code> will be initialized once, when the function is called for the first time.</p>
<p>However, t... | c++: is it better to have a global variable or create a local variable? | c++ | 0 | 58 | 1 | 72,980,855 | 72,980,855 | 0 | true | 2022-07-14T12:42:43.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
c++: is it better to have a global variable or create a local variable?<p>for example i have a library function which needs to be used for validating signatu... |
72,891,005 | R - s3 plot theme<p>I want to have one exported function <code>my_theme()</code> that can be applied to different chart types (ggplot, highcharter, plotly). I tried using S3 methods but there are a few problems:</p>
<ul>
<li>I can only figure out how to use the pipe <code>|></code> vs the <code>+</code> operator for... | <p>I didn't figure it out on my own but adding a <code>missing()</code> condition does the trick. This wouldn't work if there is <code>ggplot2</code> and another plotting library that is built with operators <code>+</code> instead of pipes <code>|></code>.</p>
<pre class="lang-r prettyprint-override"><code>library(h... | R - s3 plot theme | r|ggplot2 | 2 | 58 | 1 | 72,987,873 | 72,987,873 | 0 | true | 2022-07-07T00:02:02.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R - s3 plot theme<p>I want to have one exported function <code>my_theme()</code> that can be applied to different chart types (ggplot, highcharter, plotly). ... |
72,982,681 | I have a collection of objects in laravel. When I try to access it in blade it shows "Attempt to read property "year_month" on array"<pre><code>^ Illuminate\Support\Collection {#1471 ▼
#items: array:9 [▼
0 => {#1490 ▼
+"year_month": "2022-01"
}
1 => {#1452 ▼
+"ye... | <p>Livewire does not hydrate <code>stdClass</code> properties. They will be converted to <code>array</code> structure.</p>
<p>Note the <a href="https://laravel-livewire.com/docs/2.x/properties#important-notes" rel="nofollow noreferrer">supported types</a>.</p> | I have a collection of objects in laravel. When I try to access it in blade it shows "Attempt to read property "year_month" on array" | laravel|laravel-livewire|laravel-collection | 0 | 58 | 1 | 72,989,891 | 72,989,891 | 0 | true | 2022-07-14T15:02:30.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I have a collection of objects in laravel. When I try to access it in blade it shows "Attempt to read property "year_month" on array"<pre><code>^ Illuminate\... |
72,991,480 | why it didn't catch the rejected promise?<p>I was wondering why the <code>try-catch</code> block couldn't catch the promise rejected from <code>foo</code>.</p>
<p>Frustrated, need help. Thanks in advance.</p>
<pre class="lang-js prettyprint-override"><code>function addTask(task) {
setTimeout(() => {
task.resol... | <p>It's the same reason that if you had:</p>
<pre><code>const result = foo();
</code></pre>
<p>Then you would have a promise stored in <code>result</code> and not the settled value of the promise.</p>
<p>The asynchronous code is started, then the calling function continues.</p>
<p>Sometime <em>later</em> the promise is... | why it didn't catch the rejected promise? | javascript|promise | -1 | 58 | 4 | 72,991,519 | 72,991,519 | 0 | true | 2022-07-15T08:55:03.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why it didn't catch the rejected promise?<p>I was wondering why the <code>try-catch</code> block couldn't catch the promise rejected from <code>foo</code>.</... |
72,995,047 | Display text information with scripts that use the 'timeframe' argument<p>I have a script that uses the <code>timeframe</code> argument:</p>
<pre><code>indicator ("My script", timeframe="D")
</code></pre>
<p>I would like to display some short text information on its chart (at any location), but I ca... | <p>Pine Drawings are the only way to display non-constant string values on the chart, and the drawings do not work with the <code>timeframe=</code> parameter of the <code>indicator()</code> function, so there is no way to resolve this issue from that side.</p>
<p>Another approach is possible, though: use <code>request.... | Display text information with scripts that use the 'timeframe' argument | pine-script|pinescript-v5 | 0 | 58 | 1 | 72,995,820 | 72,995,820 | 0 | true | 2022-07-15T13:48:47.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display text information with scripts that use the 'timeframe' argument<p>I have a script that uses the <code>timeframe</code> argument:</p>
<pre><code>indic... |
73,000,925 | How do I edit multiple strings inside a list within a dictionary?<p>I'm currently working with a data structure that uses a dictionary where the value for each key is a list. For the sake of the question, I've simplified my structure into an easy-to-understand example.</p>
<p>Using a for loop, how would I loop through ... | <p>You can nest dict comprehension and list comprehension:</p>
<pre class="lang-py prettyprint-override"><code>test_dict = {"key1": ["value1", "value2"], "key2": ["value3", "value4"]}
output = {k: [v[1:] for v in lst] for k, lst in test_dict.items()}
print(ou... | How do I edit multiple strings inside a list within a dictionary? | python|list|dictionary|for-loop | 0 | 58 | 3 | 73,001,053 | 73,001,053 | 0 | true | 2022-07-16T01:25:01.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I edit multiple strings inside a list within a dictionary?<p>I'm currently working with a data structure that uses a dictionary where the value for ea... |
73,001,384 | MUI CSS: How to control image?<p>I have a MUI React Component with a Card wrapping img and buttons</p>
<pre><code><Card key={index} className="xl:w-[350px] w-[310px] max-h-[450px]">
<img src={meme.url} className="center bg-cover" alt="" />
<Box className="h-[72px] f... | <p>Because bottom Box have 72px height, so image height should be <code>calc(100% - 72px)</code>, you also need set <code>w-full object-cover</code> to image</p>
<pre><code><Card
key={index}
className="max-h-[450px] w-[310px] xl:w-[350px]"
>
<img
style={{ height: `calc(100% - 72px... | MUI CSS: How to control image? | css|reactjs|material-ui|tailwind-css | 0 | 58 | 2 | 73,001,450 | 73,001,450 | 0 | true | 2022-07-16T03:53:13.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MUI CSS: How to control image?<p>I have a MUI React Component with a Card wrapping img and buttons</p>
<pre><code><Card key={index} className="xl:w-[... |
72,905,085 | getting a local docker-composed node / express & react app deployed on GCP using a single Dockerfile<p>I have a nodejs / express / react app running locally that starts a node server at :3001 and a react app at :3000 which can make requests to the express API.</p>
<p>I then made a <code>/client/Dockerfile</code> and a ... | <p>this was my final docker file to replace docker-compose:</p>
<pre><code>FROM node:lts-slim AS client
WORKDIR /usr/src/app
COPY client/ ./client/
RUN cd client && npm install && npm run build
FROM node:lts-slim AS server
WORKDIR /root/
COPY --from=client /usr/src/app/client/build ./client/build
COPY ... | getting a local docker-composed node / express & react app deployed on GCP using a single Dockerfile | node.js|docker|google-cloud-platform|google-cloud-run | 0 | 58 | 1 | 73,008,000 | 73,008,000 | 0 | true | 2022-07-07T23:05:36.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
getting a local docker-composed node / express & react app deployed on GCP using a single Dockerfile<p>I have a nodejs / express / react app running locally ... |
73,009,831 | the logic here doesn't make sense in javascript<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>cellColor = {};
cellColor['cel32'] = 'blue';
cellColor['cel24'] = 'blue';
cellColor['... | <p>You are comparing <code>boolean</code> with <code>blue</code> so that will return <code>false</code></p>
<p>you are comparing <code>true</code> with <code>blue</code> which will return <code>false</code>.</p>
<pre><code>cellColor = {};
cellColor['cel32'] = 'blue';
cellColor['cel24'] = 'blue';
cellColor['cel16'] = 'b... | the logic here doesn't make sense in javascript | javascript|javascript-objects | 0 | 58 | 1 | 73,009,872 | 73,009,872 | 0 | true | 2022-07-17T07:08:48.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
the logic here doesn't make sense in javascript<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="s... |
73,002,200 | events `messageUpdate` and `messageDelete` doesn't "work" after bot restart<p>Well, events <code>messageUpdate</code> and <code>messageDelete</code> doesn't "work" after restarting the bot</p>
<p>I mean, they don't respond to messages that were sent before the restart</p>
<p>I added MESSAGE to partials</p>
<p... | <p>The error means that <code>newMessage.author</code> is <code>null</code>. You already knew that you would need to use the <code>MESSAGE</code> partials.</p>
<p>The problem is that you don't check if the received message is a partial only.</p>
<p>A partial message will not contain all of the original <code>Message</c... | events `messageUpdate` and `messageDelete` doesn't "work" after bot restart | javascript|node.js|discord.js | 1 | 58 | 1 | 73,013,142 | 73,013,142 | 0 | true | 2022-07-16T07:01:17.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
events `messageUpdate` and `messageDelete` doesn't "work" after bot restart<p>Well, events <code>messageUpdate</code> and <code>messageDelete</code> doesn't ... |
73,012,092 | Getting cable a connected/disconnect notification<p>On Windows with Qt5.15, I implemented a cable connected/disconnected notifier based on <a href="https://doc.qt.io/qt-5/qnetworkinterface.html" rel="nofollow noreferrer">QNetworkInterface</a>.</p>
<p>It calls <code>allinterfaces()</code> every second and checks the fla... | <p>There is not really a signal for this in QNetworkInterface. Polling is the only way to achieve this cross-platform using the isUp method.</p>
<p>I would not compromise the cross-platform behaviour for a Windows specific API as that would have an impact on the portability of the application.</p>
<p>Polling may not be... | Getting cable a connected/disconnect notification | c++|windows|qt|network-programming | 0 | 58 | 2 | 73,018,927 | 73,018,927 | 0 | true | 2022-07-17T13:13:02.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting cable a connected/disconnect notification<p>On Windows with Qt5.15, I implemented a cable connected/disconnected notifier based on <a href="https://d... |
73,006,750 | How to fix the broken divider of website to the bottom 0<p>I am developing a website using react. I want to add a divider for all sections. But I can't set its position at bottom 0. It seems like this:
<a href="https://i.stack.imgur.com/QNQJZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QNQJZ.png"... | <pre><code>import { color } from "@mui/system";
import React from "react";
import { NavigationDots, SocialMedia } from "../components";
const AppWrap = (Component, idName, classNames) =>
function HOC() {
return (
<div id={idName} className={`app__container ${classNames}`... | How to fix the broken divider of website to the bottom 0 | javascript|html|css|reactjs|wrapper | 0 | 58 | 1 | 73,021,310 | 73,021,310 | 0 | true | 2022-07-16T18:32:04.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix the broken divider of website to the bottom 0<p>I am developing a website using react. I want to add a divider for all sections. But I can't set i... |
73,023,755 | JetpackCompose how to createChooser and listen for result<p>I want to show a system dialog to user to select from available applications for sharing text from my app. I can do this by using createChooser function from Intent class. But i also want to listen for the system dialog result, so that i can disable/enable my ... | <p>I was able to listen the result using <em>rememberLauncherForActivityResult</em> Composable function by combining it with <em>ActivityResultContracts.StartActivityForResult</em> abstract class. you can see the usage example i have implemented below. Please share your opinions/corrections or alternatives for my probl... | JetpackCompose how to createChooser and listen for result | android|kotlin|android-jetpack-compose | 0 | 58 | 1 | 73,023,756 | 73,023,756 | 0 | true | 2022-07-18T14:12:08.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JetpackCompose how to createChooser and listen for result<p>I want to show a system dialog to user to select from available applications for sharing text fro... |
73,030,716 | how to create a flash message when a user successfully logged in on fortify?<p>how to create a flash message when a user successfully logged in on fortify?
later in the blade view I just need to call using</p>
<pre><code> @if(session()->has('success-login'))
<div class="alert alert... | <p>According to <a href="https://laravel.com/docs/9.x/fortify#customizing-authentication-redirects" rel="nofollow noreferrer">laravel document</a> you can use the <code>with</code> method and redirect to your custom page with a flash message.</p>
<pre class="lang-php prettyprint-override"><code>public function register... | how to create a flash message when a user successfully logged in on fortify? | laravel|fortify|laravel-fortify | 0 | 58 | 1 | 73,031,120 | 73,031,120 | 0 | true | 2022-07-19T03:15:41.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to create a flash message when a user successfully logged in on fortify?<p>how to create a flash message when a user successfully logged in on fortify?
l... |
72,975,803 | .Net Core webapi expection catch middleware not catch exception throw from ActionFilter<p>i wrote a gloabl exception catch middleware like this:</p>
<pre class="lang-cs prettyprint-override"><code> public GlobalExceptionCatchMiddleware(RequestDelegate next, ILogger<GlobalExceptionCatchMiddleware> logger)
... | <p>finally, i found the solution: just remove <code>async</code> and replace all <code>await</code> with <code>.Result</code>, then global exception handler can catch the exception thrown from action filter.</p>
<p>to be honest, i still didn't figure out the reason, but at least the problem is solved, isn't it?</p> | .Net Core webapi expection catch middleware not catch exception throw from ActionFilter | asp.net-core|.net-core|asp.net-core-webapi | 0 | 58 | 1 | 73,048,546 | 73,048,546 | 0 | true | 2022-07-14T05:52:23.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
.Net Core webapi expection catch middleware not catch exception throw from ActionFilter<p>i wrote a gloabl exception catch middleware like this:</p>
<pre cla... |
72,989,247 | Using pycrypto decrypted data in SQLAlchemy query - Python Flask<p>Currently I have a PostgreSQL database that contains existing data. I would like to start encrypting some of the data going into the database. Hence there will be a mixture of legacy data that's not encrypted and new (going forward) data that will be en... | <p>I was able to solve my issue by using <a href="https://github.com/sqlalchemy/sqlalchemy/wiki/SymmetricEncryptionClientSide" rel="nofollow noreferrer">SymmetricEncryptionClientSide</a> and performing the encryption on the client side through a SQLAlchemy hybrid property.</p> | Using pycrypto decrypted data in SQLAlchemy query - Python Flask | python|flask|sqlalchemy|pycrypto | 0 | 58 | 1 | 73,061,143 | 73,061,143 | 0 | true | 2022-07-15T05:03:18.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using pycrypto decrypted data in SQLAlchemy query - Python Flask<p>Currently I have a PostgreSQL database that contains existing data. I would like to start ... |
72,959,026 | Joi, add extension type with argument<p>I want to add <code>splitArray</code> type to Joi which converts string to an array using method <code>Array.split</code>. As you know, <code>Array.split</code> can split by argument, and I want to pass this argument during creation of the schema and not during it's usage.</p>
<p... | <p>So, anyway, I've figured it out:</p>
<pre class="lang-js prettyprint-override"><code>const customJoi = Joi.extend(joi => ({
type: 'splitArray', // add type with custom name
base: joi.array(), // let's base it on Joi.array
messages: { // this is required to yell if we didn't get a string before p... | Joi, add extension type with argument | javascript|schema|joi | 0 | 58 | 1 | 73,168,098 | 73,168,098 | 0 | true | 2022-07-12T22:29:05.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Joi, add extension type with argument<p>I want to add <code>splitArray</code> type to Joi which converts string to an array using method <code>Array.split</c... |
73,014,516 | Android speech Recognition not working with Room database query<p>Room Entity's data is stored but it's object is always null.</p>
<p>@Override
public void onResults(Bundle bundle) {</p>
<pre><code> ArrayList<String> list = bundle.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
String string = li... | <p>Room Entity's data is stored but it's object is always null.</p> | Android speech Recognition not working with Room database query | java|android|android-room|voice-recognition|recognizer-intent | 0 | 58 | 1 | 73,171,505 | 73,171,505 | 0 | true | 2022-07-17T18:53:36.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android speech Recognition not working with Room database query<p>Room Entity's data is stored but it's object is always null.</p>
<p>@Override
public void o... |
73,011,795 | How to multiply two images with different encoding<p>I have two textures map, one albedo and another ambient occlusion. The albedo one is <code>srgb</code> encoded <code>.jpg</code> whereas the ambient occlusion is <code>linear</code> encoded <code>.jpg</code>.</p>
<p><strong>Now, I want to load these two images (prefe... | <p>Well I found out a trick with which we can trick sharp to work with <code>linear</code> encodings.</p>
<p>So, we know that our file is <code>linear</code> encoded. But since it has no <code>metadata</code>, <code>sharp</code> assumes it to be sRGB encoded. So what can we do? Hmm..</p>
<pre><code>sharp(ifile)
.pi... | How to multiply two images with different encoding | c++|node.js|image-processing|blender|sharp | 0 | 58 | 1 | 73,217,895 | 73,217,895 | 0 | true | 2022-07-17T12:31:44.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to multiply two images with different encoding<p>I have two textures map, one albedo and another ambient occlusion. The albedo one is <code>srgb</code> e... |
72,981,889 | PostgreSQL: rename an unnamed partition?<p>I created a table with monthly partitions, however I made a mistake with the initial partition.</p>
<p>When I browse the partitions in Data Grip it first one shows up as unnamed (see image)</p>
<p><a href="https://i.stack.imgur.com/2bzWr.png" rel="nofollow noreferrer"><img src... | <p>Just FYI, in the end I dropped the table and recreated it with the correct partition name (and populated the data from a back-up).</p>
<p>I was not able to re-name the unnamed partition.</p> | PostgreSQL: rename an unnamed partition? | postgresql|rename|partition | 2 | 58 | 2 | 73,231,045 | 73,231,045 | 0 | true | 2022-07-14T14:07:19.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL: rename an unnamed partition?<p>I created a table with monthly partitions, however I made a mistake with the initial partition.</p>
<p>When I brow... |
72,925,154 | Laravel 8.55 and queue behavior using S3 file upload<p>I inherited some Laravel code (currently running version 8.55) and there is a job that is initiated by uploading a CSV file via a web page.</p>
<p>That CSV file uploaded to an S3 bucket, processed (using the Laravel-Excel), causing updates to database entries, an e... | <p>The answer, as pointed out by @matiaslauriti, was incorrect AWS keys in one of the environments that was processing the production queue.</p> | Laravel 8.55 and queue behavior using S3 file upload | laravel|amazon-s3|queue | 1 | 58 | 1 | 73,239,413 | 73,239,413 | 0 | true | 2022-07-09T23:04:35.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel 8.55 and queue behavior using S3 file upload<p>I inherited some Laravel code (currently running version 8.55) and there is a job that is initiated by... |
72,940,247 | Can I change the order of two key:value?<p>So I want to change the order in a dictionary of two key:values</p>
<p>The example is:</p>
<p><code>dico = {'a': [0, 0, '-', 'b'], 'b': [0, 0, 'c', 'd'], 'c': [1, 0, 'a', 'b'], 'd': [0, 0, 'c', '-']}</code></p>
<p>I want to change the order between the key 'b' and 'c' like thi... | <p>Given the example dictionary data in Python language, you should change the position of two keys <code>‘b’</code> and <code>‘c’</code>. However, in dictionary type, keys cannot change directly. Using <code>keys()</code> function and <code>list()</code> function, you have to make another list data named <code>keys</c... | Can I change the order of two key:value? | python|list|dictionary | -3 | 58 | 2 | 72,940,826 | 72,940,826 | 0 | true | 2022-07-11T14:33:50.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I change the order of two key:value?<p>So I want to change the order in a dictionary of two key:values</p>
<p>The example is:</p>
<p><code>dico = {'a': [... |
72,822,579 | How to display legend for matplotlib scatterplot color<p>I am plotting a two variable function on a 2d scatter plot, but I want to show a legend on what color on the scatter plot corresponds to what Z-value. Current code I have is below.</p>
<pre><code>x = [1, 2, 3, 4, 5]
y = [1, 2, 3, 4, 5]
z = [3, 8.5, 2.1, 1.8, 9]
... | <p>Try this:</p>
<pre><code>import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [1, 2, 3, 4, 5]
z = [3, 8.5, 2.1, 1.8, 9]
fig1, ax1 = plt.subplots()
scat = ax1.scatter(x, y, linewidths=1, alpha = .7, edgecolor= 'k', s=200, c=z)
ax1.legend(*scat.legend_elements(), title="Colors")
plt.show()
</code></pre... | How to display legend for matplotlib scatterplot color | python|matplotlib|scatter | 0 | 58 | 1 | 72,823,276 | 72,823,276 | 0 | true | 2022-06-30T22:17:04.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display legend for matplotlib scatterplot color<p>I am plotting a two variable function on a 2d scatter plot, but I want to show a legend on what colo... |
72,909,710 | Separation of the dataframes by row values<p>I want to split my dataframe based on the first row to generate four separate dataframes (for subgroup analysis). I have a 172x106 Excel file, where the first row consists of either a 1, 2, 3, or 4. The other 171 lines are radiomic features, which I want to copy to the ''new... | <p>I am not sure that this is the result you want. If not, please clearly show the desired output.</p>
<p>You can simply achieve what you want by transposing your dataframe.</p>
<pre><code>import numpy as np
import pandas as pd
np.random.seed(0)
n = 5
data = np.stack((np.random.choice([1, 2, 3, 4], n), np.random.rand... | Separation of the dataframes by row values | python|pandas|dataframe | 0 | 58 | 2 | 72,910,066 | 72,910,066 | 0 | true | 2022-07-08T09:58:25.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Separation of the dataframes by row values<p>I want to split my dataframe based on the first row to generate four separate dataframes (for subgroup analysis)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.