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,377,146 | Using static vs not including function in header in C<p>I know about the <code>static</code> keyword in C before a function declaration to only allow the file it is declared at to use the function (the compilation unit, to be more precise). I've done some research and I have found already answered questions regarding <... | <p>When we have an application written by multiple people, and one person defined a function <code>square</code> to compute the mathematical square of a number and another person defined a function <code>square</code> to draw a square on a display, then, if neither function is defined with <code>static</code>, linking ... | Using static vs not including function in header in C | c|static|keyword | 0 | 80 | 1 | 72,377,302 | 72,377,302 | 3 | true | 2022-05-25T11:53:40.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using static vs not including function in header in C<p>I know about the <code>static</code> keyword in C before a function declaration to only allow the fil... |
72,387,644 | How to fix "Argument 1: cannot convert from 'double' to 'string'"?<p>I'm currently creating a money counter application, but I've got an error on this line: <code>MessageBox.Show(total);</code>.
Can someone help me?
Error: <code>Argument 1: cannot convert from 'double' to 'string'</code>
Code: <a href="https://www.topt... | <p>You have to use ToString() to convert the double to a string.</p>
<pre><code> MessageBox.Show(total.ToString());
</code></pre> | How to fix "Argument 1: cannot convert from 'double' to 'string'"? | c#|winforms | 0 | 80 | 1 | 72,387,663 | 72,387,663 | 3 | true | 2022-05-26T06:30:27.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix "Argument 1: cannot convert from 'double' to 'string'"?<p>I'm currently creating a money counter application, but I've got an error on this line: ... |
72,245,176 | SQL : Getting Incorrect Syntax near '=' While using CASE statement with variables<p>I am trying to perform the below query where some variables are being used. This below SQL code is a part of a stored procedure. Idea is to dynamically set the target columns and its values based on <code>FileKey</code>.</p>
<pre><code>... | <p>Also, by doing <em>concat</em> with your quoted parts, you might allow <a href="https://en.wikipedia.org/wiki/SQL_injection" rel="nofollow noreferrer">SQL injection</a> into your query even building dynamically. What if a user's name (or forced parameter <em>has</em> a leading single quote, then garbage injection s... | SQL : Getting Incorrect Syntax near '=' While using CASE statement with variables | sql|sql-server | 0 | 80 | 2 | 72,245,769 | 72,245,769 | 3 | true | 2022-05-15T02:32:21.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL : Getting Incorrect Syntax near '=' While using CASE statement with variables<p>I am trying to perform the below query where some variables are being use... |
72,343,179 | onClick function is called for every input change<p>Im trying to post to a local server using an onclick function, but every time the input field changes here, it calls the function, leading to unecessary function calls, and I can't figure out why it is being called here.</p>
<pre><code>const testPost = () => {
co... | <p>Lose the (), So it’s just <code>{testPost}</code>.</p>
<p>If you do <code>testPost()</code> you’re calling/executing <code>testPost</code> every time the component renders. As soon as that line is encountered by the JS interpreter, it runs the function.</p>
<p>With <code>onClick</code>, you only want to pass the ref... | onClick function is called for every input change | javascript|node.js|reactjs|axios | 0 | 80 | 1 | 72,343,196 | 72,343,196 | 3 | true | 2022-05-23T04:08:29.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
onClick function is called for every input change<p>Im trying to post to a local server using an onclick function, but every time the input field changes her... |
72,350,714 | Why aren't my CSS borders showing up in JavaFX gui?<p>I'm trying to show walls on the GUI (fxml) with CSS borders using .getStyleClass().add() but they're not showing up.</p>
<p>I'm using a switch that adds the corresponding style classes to the cells.</p>
<p>The Java code:</p>
<pre><code>private StackPane createCell(i... | <p>The properties <code>border-top</code>, <code>border-right</code>, etc. are not valid JavaFX CSS properties.</p>
<p>Referring to the <a href="https://openjfx.io/javadoc/17/javafx.graphics/javafx/scene/doc-files/cssref.html#region" rel="nofollow noreferrer">documentation</a>, you set the border using the properties</... | Why aren't my CSS borders showing up in JavaFX gui? | java|user-interface|javafx|fxml|javafx-css | 0 | 80 | 2 | 72,351,713 | 72,351,713 | 4 | true | 2022-05-23T15:00:41.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why aren't my CSS borders showing up in JavaFX gui?<p>I'm trying to show walls on the GUI (fxml) with CSS borders using .getStyleClass().add() but they're no... |
72,350,951 | Why are finding elements most efficient in arrays in c++?<p>I need a fast STL container for finding if an element exists in it, so I tested arrays, vectors, sets, and unordered sets. I thought that sets were optimized for finding elements, because of unique and ordered values, but the fastest for 10 million iterations ... | <p>Please remember that in <code>C</code> and <code>C++</code> there is the <a href="https://en.cppreference.com/w/cpp/language/as_if" rel="nofollow noreferrer">as if rule</a>!
This means compiler can transform code by any means (even by dropping code) as long as observable result of running code remains unchanged.</p>... | Why are finding elements most efficient in arrays in c++? | c++|set|find | -3 | 80 | 2 | 72,351,086 | 72,351,086 | 5 | true | 2022-05-23T15:16:59.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why are finding elements most efficient in arrays in c++?<p>I need a fast STL container for finding if an element exists in it, so I tested arrays, vectors, ... |
72,248,666 | Pattern match on Data.Text constant?<p>I guess I am blind or something, so that I could not find the idiomatic way to pattern match on Data.Text constants.</p>
<p>Basically, what I want to do is the following:</p>
<pre class="lang-hs prettyprint-override"><code>getTempDriverName dir >>= \case
"k10temp"... | <p>If you <em>really</em> want to pattern match here, you can use the <a href="https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/overloaded_strings.html#extension-OverloadedStrings" rel="noreferrer"><code>OverloadedStrings</code></a> extension because <code>Text</code> is an instance of <a href="https://hackage.h... | Pattern match on Data.Text constant? | haskell|text | 1 | 80 | 1 | 72,248,857 | 72,248,857 | 7 | true | 2022-05-15T13:24:45.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pattern match on Data.Text constant?<p>I guess I am blind or something, so that I could not find the idiomatic way to pattern match on Data.Text constants.</... |
72,959,945 | How to write an overload function for std::array that calls a variadic function?<p>I have the following variadic function:</p>
<pre><code>template <typename... Args>
CustomType<Args...> method(const Args& args...);
</code></pre>
<p>which works fine when I just do e.g.</p>
<pre><code>method(1.0f, 2.0f, 3... | <p>You can wrap it in a lambda and let the compiler deduce the type for you</p>
<pre><code>template <typename T, std::size_t N>
auto method(const std::array<T, N>& arr)
{
return methodArr(arr, [](const auto&... args) { return method(args...); });
}
</code></pre>
<p><a href="https://godbolt.org/z/... | How to write an overload function for std::array that calls a variadic function? | c++|arrays|lambda|variadic | 2 | 80 | 1 | 72,960,035 | 72,960,035 | 1 | true | 2022-07-13T01:23:50.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write an overload function for std::array that calls a variadic function?<p>I have the following variadic function:</p>
<pre><code>template <typena... |
72,809,713 | C++ output printed twice and error exit code: -1<p>I am learning and practicing with C++. I an error when I tried to run the program. I tried different things like changing the sign (<=,>=,<,>) but I don't think they are the problem. I was planning to create different classes for each range of bonus salary ... | <p>As identified already in the comments, you have a few issues. I'm going to spell them out for you as an answer.</p>
<p>The first issue is that your final <code>else</code> is only controlling a single line because it does not enclose the multiple statements in brackets.</p>
<pre><code>else
bonus = oldSalary * 0... | C++ output printed twice and error exit code: -1 | c++ | 0 | 80 | 1 | 72,809,967 | 72,809,967 | 1 | true | 2022-06-30T02:29:03.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C++ output printed twice and error exit code: -1<p>I am learning and practicing with C++. I an error when I tried to run the program. I tried different thing... |
72,919,986 | How to run parallel processes with multiprocessing terminate one of them from another and then restart<pre><code>I get error when running the code
</code></pre>
<blockquote>
<p>TypeError: Pickling an AuthenticationString object is disallowed for
security reasons</p>
</blockquote>
<p>I am very new to this... You can add... | <p>Here is a simpler way, relevant to your code, to reproduce the error you are getting:</p>
<pre><code>import time
from multiprocessing import Manager, Process
def a():
time.sleep(4)
print('done')
if __name__ == "__main__":
manager = Manager()
l = manager.list()
b = Process(target=a)... | How to run parallel processes with multiprocessing terminate one of them from another and then restart | python|python-3.x|multiprocessing|multiprocessing-manager | -1 | 80 | 1 | 72,921,143 | 72,921,143 | 1 | true | 2022-07-09T08:26:10.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to run parallel processes with multiprocessing terminate one of them from another and then restart<pre><code>I get error when running the code
</code></p... |
72,852,245 | why I am not able to initialize array of pointers providing 2d array<p><a href="https://i.stack.imgur.com/crqve.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/crqve.png" alt="enter image description here" /></a></p>
<pre><code>int *p = ( int[] ){ 1, 2, 3, 4 };
</code></pre>
<p>Doing this I am able t... | <p>The <a href="https://en.cppreference.com/w/c/language/compound_literal" rel="nofollow noreferrer">compound literal</a></p>
<pre><code>(int [][3]) { {1,2,3},{10,20,30} };
</code></pre>
<p>has the type</p>
<pre><code>int [2][3]
</code></pre>
<p>i.e. array of 2 elements, each consisting of 3 <code>int</code> elements.<... | why I am not able to initialize array of pointers providing 2d array | arrays|c|pointers|anonymous | 1 | 80 | 2 | 72,852,727 | 72,852,727 | 1 | true | 2022-07-04T05:49:35.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why I am not able to initialize array of pointers providing 2d array<p><a href="https://i.stack.imgur.com/crqve.png" rel="nofollow noreferrer"><img src="http... |
72,828,580 | Elasticsearch NEST - filter by multiple fields<p>I have a query and want to do a search by multiple fields in case if no result by <code>uuid</code> need to do the same by <code>parentUuid</code>:</p>
<p>C# query:</p>
<pre><code>return new NestedQuery
{
Path = Infer.Field<ElasticDocument>(t => t.KeywordFie... | <p>Try to combine bool query:</p>
<pre><code> nested1 = new NestedQuery {
Path = Infer.Field<ElasticDocument>(t => t.KeywordFields),
Query = new BoolQuery {
Filter = new List<QueryContainer>
{
new TermsQuery {... | Elasticsearch NEST - filter by multiple fields | elasticsearch|.net-core|nest | 0 | 80 | 1 | 72,829,371 | 72,829,371 | 1 | true | 2022-07-01T11:28:21.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Elasticsearch NEST - filter by multiple fields<p>I have a query and want to do a search by multiple fields in case if no result by <code>uuid</code> need to ... |
72,800,849 | How to change the column order according to the category list?<p>I have a dataframe <code>df</code> and the column <code>cats</code> is categorical, as:</p>
<pre><code>> df['cats'] = pd.Categorical(df['cats'], categories=['A+', 'A', 'B+', 'B', 'C', '-'], ordered=True)
</code></pre>
<p>From <code>df</code> I got a <c... | <p>Your <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pivot.html" rel="nofollow noreferrer"><code>pivot</code></a> seems incorrect, you should fix the parameters and combine with <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.sort_index.html" re... | How to change the column order according to the category list? | python|pandas|dataframe|heatmap | 3 | 80 | 2 | 72,800,954 | 72,800,954 | 2 | true | 2022-06-29T11:43:32.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change the column order according to the category list?<p>I have a dataframe <code>df</code> and the column <code>cats</code> is categorical, as:</p>
... |
72,853,968 | How to change WPF Window Title Bar Background<p>How to change the background color of wpf window title bar. I used the following code, but it didnt work. I cannot see the close button when i change the color of the grid.</p>
<p><strong>Current</strong></p>
<p><a href="https://i.stack.imgur.com/Iold4.png" rel="nofollow ... | <p>When you extend your own content into the non-client area of a window using the <code>WindowChrome</code> class, you should define <a href="https://stackoverflow.com/questions/44190041/show-default-window-buttons-on-wpf-window-using-windowchrome">custom captions button</a> yourself:</p>
<pre><code><Style x:Key=&q... | How to change WPF Window Title Bar Background | c#|wpf|window|window-chrome | 0 | 80 | 1 | 72,856,940 | 72,856,940 | 2 | true | 2022-07-04T08:45:26.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change WPF Window Title Bar Background<p>How to change the background color of wpf window title bar. I used the following code, but it didnt work. I c... |
72,869,461 | Why SHA hash generated from Angular application and online tool differs for unicode character<p>The hash generated for text containing rupees symbol and unicode is always producing same hash if I execute in angular application where as it differs from the online hash generation tool
<strong>Application</strong></p>
<p>... | <p>It seems the online SHA256 hash tool you are using doesn't support Unicode character escape sequences. So when you tell it to compute the hash of <code>\u20B9</code> it doesn't pick up that you mean the rupee symbol and instead computes the hash of the six-character string with characters <code>\</code>, <code>u</co... | Why SHA hash generated from Angular application and online tool differs for unicode character | javascript|angular|unicode|sha256 | 0 | 80 | 1 | 72,870,035 | 72,870,035 | 2 | true | 2022-07-05T12:29:18.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why SHA hash generated from Angular application and online tool differs for unicode character<p>The hash generated for text containing rupees symbol and unic... |
72,884,815 | How to stream frames from OpenCV C++ code to Video4Linux or ffmpeg?<p>I am experimenting with OpenCV to process frames from a video stream. The goal is to fetch a frame from a stream, process it and then put the processed frame to a new / fresh stream.</p>
<p>I have been able to successfully read streams using OpenCV v... | <p>We may use the same technique as in my <a href="https://stackoverflow.com/a/61281547/4926757">following Python code sample</a>.</p>
<ul>
<li><p>Execute FFmpeg as sub-process, open stdin pipe for writing</p>
<pre><code> FILE *pipeout = popen(ffmpeg_cmd.c_str(), "w")
</code></pre>
</li>
<li><p>Write <code>fr... | How to stream frames from OpenCV C++ code to Video4Linux or ffmpeg? | c++|opencv|ffmpeg|video4linux | 1 | 80 | 1 | 72,889,919 | 72,889,919 | 2 | true | 2022-07-06T13:53:10.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to stream frames from OpenCV C++ code to Video4Linux or ffmpeg?<p>I am experimenting with OpenCV to process frames from a video stream. The goal is to fe... |
72,904,012 | Extract part of the strings with specific format<p>I am currently trying to crack the seemingly simple problem in R but somehow I am unable to find a way to do it with <code>gsub</code>, <code>str_match()</code> or some other <code>rgex</code>-related functions. Can anyone please help me crack this problem?</p>
<p><str... | <p>You might use a pattern to assert 9-21 chars to the right including the underscore, then the match the first 2 parts with the single underscore:</p>
<pre><code>^(?=\\w{9,21}_[A-Z0-9])[A-Z]+_[A-Z0-9]+
</code></pre>
<p><strong>Explanation</strong></p>
<ul>
<li><code>^</code> Start of string</li>
<li><code>(?=</code> P... | Extract part of the strings with specific format | r|string|split | 2 | 80 | 6 | 72,909,162 | 72,909,162 | 2 | true | 2022-07-07T20:44:52.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract part of the strings with specific format<p>I am currently trying to crack the seemingly simple problem in R but somehow I am unable to find a way to ... |
72,986,833 | Scrape Only English Tweets using Twitter Api in R<p>I have been working on a project related to Sentiment Analysis of Emojis. I have used this simple code to scrape tweets specifically on the topic "Uber" but I only want tweets in English and the code I am using gives me the tweets from all the languages. How... | <p>From the documentation <code>?search_tweets</code>:</p>
<blockquote>
<p>...<br />
Further arguments passed as query parameters in request sent to Twitter's REST API. To return only English language tweets, for example, use lang = "en". For more options see Twitter's API documentation.</p>
</blockquote>
<p>... | Scrape Only English Tweets using Twitter Api in R | r|web-scraping|sentiment-analysis|tweets | 1 | 80 | 1 | 72,987,620 | 72,987,620 | 2 | true | 2022-07-14T21:27:13.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scrape Only English Tweets using Twitter Api in R<p>I have been working on a project related to Sentiment Analysis of Emojis. I have used this simple code to... |
72,994,548 | QML enabled property and inheritance : disable parent and enable child?<p>I have a <code>MyInnerRectangle</code> component inside a <code>MyRectangle</code>.
I want to be able to set <code>MyInnerRectangle.enabled</code> to <code>true</code> even if <code>MyRectangle.enabled</code> is set to <code>false</code>.</p>
<p>... | <p>The <a href="https://doc.qt.io/qt-5/qml-qtquick-item.html#enabled-prop" rel="nofollow noreferrer">docs</a> are pretty clear on this:</p>
<blockquote>
<p>Setting this property directly affects the enabled value of child items. When set to false, the enabled values of all child items also become false. When set to tru... | QML enabled property and inheritance : disable parent and enable child? | inheritance|qml|qt5.3 | 1 | 80 | 1 | 72,996,080 | 72,996,080 | 2 | true | 2022-07-15T13:12:23.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
QML enabled property and inheritance : disable parent and enable child?<p>I have a <code>MyInnerRectangle</code> component inside a <code>MyRectangle</code>.... |
73,009,306 | ways of generating random arrays with a button? JS<p>im a early student and im trying to learn Javascript by myself since in university i only have C. As a side-project im trying to do a password generator, i want to know what are viable ways of generating a random array with elements of other already declared arrays. ... | <p>Since you are newer to JavaScript, let's do it the simplest way. Not the fastest, or shortest way, but the simplest, easiest to understand way.</p>
<p>I believe that combining these arrays:</p>
<pre class="lang-js prettyprint-override"><code>let upperCase = ["A", "B", "C", "D"... | ways of generating random arrays with a button? JS | javascript | 0 | 80 | 3 | 73,009,550 | 73,009,550 | 2 | true | 2022-07-17T04:42:11.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ways of generating random arrays with a button? JS<p>im a early student and im trying to learn Javascript by myself since in university i only have C. As a s... |
73,007,716 | Parallel Writes to NFS-backed File<p>UPDATE: I had each node write to a separate file, and when the separate files were concatenated together the result was correct. I also updated the code to attempt a channel flush and file sync after each write of a single record, but there are still issues between nodes 0 and 1, no... | <p>Adding an answer here that solved my particular problem, though it doesn't explain the behavior seen. I ended up changing the outer loop from <code>coforall loc in Locales</code> to <code>for loc in Locales</code>. This isn't too big of an issue since it's all writing to one file anyway - I doubt that multiple local... | Parallel Writes to NFS-backed File | chapel | 3 | 80 | 2 | 73,015,988 | 73,015,988 | 2 | true | 2022-07-16T21:20:37.803Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parallel Writes to NFS-backed File<p>UPDATE: I had each node write to a separate file, and when the separate files were concatenated together the result was ... |
72,875,968 | How to convert a quaternion to a polar/azimuthal angle rotation<p>I have an arcball camera with a rotation defined by two angles (phi/theta, polar/azimuthal) that is controlled with mouse movement.</p>
<p>I convert these two angles (as euler angles) to a quaternion like this:</p>
<pre><code>glm::quat rotation = glm::qu... | <p>I found a solution:</p>
<ul>
<li>Start with a unit vector pointing in the Z axis (depends on your engine's handedness and up-vector) <code>glm::vec3 v = glm::vec3(0, 0, 1);</code></li>
<li>Rotate the vector with the quaternion you want to convert <code>v = q*v;</code> glm does this automatically, otherwise rotate a... | How to convert a quaternion to a polar/azimuthal angle rotation | c++|rotation|quaternions|glm-math | 2 | 80 | 1 | 73,101,805 | 73,101,805 | 2 | true | 2022-07-05T21:56:23.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert a quaternion to a polar/azimuthal angle rotation<p>I have an arcball camera with a rotation defined by two angles (phi/theta, polar/azimuthal)... |
72,894,717 | I have to reload shell (exec $SHELL -l) to load all PATHs on Fish shell<p>I set Fish as a login shell referenced here(<a href="https://fishshell.com/docs/current/index.html#default-shell" rel="nofollow noreferrer">https://fishshell.com/docs/current/index.html#default-shell</a>).</p>
<p>Then installed <code>rbenv</code>... | <p>This is <a href="https://github.com/anyenv/anyenv/pull/99" rel="nofollow noreferrer">https://github.com/anyenv/anyenv/pull/99</a> - anyenv's pyenv setup interferes with other envs:</p>
<blockquote>
<p>In the current situation, pyenv init --path also causes a problem with anyenv. When logging into zsh, the initializa... | I have to reload shell (exec $SHELL -l) to load all PATHs on Fish shell | macos|shell|fish | 0 | 80 | 1 | 72,894,980 | 72,894,980 | 2 | true | 2022-07-07T08:38:06.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I have to reload shell (exec $SHELL -l) to load all PATHs on Fish shell<p>I set Fish as a login shell referenced here(<a href="https://fishshell.com/docs/cur... |
72,960,785 | Getting a sub string from a string to show in Text for Swiftui<p>Greeting everyone. I just started my Swiftui journey.</p>
<p>I am trying to get a piece of string from a string variable to display as Text() in Swiftui. In my previous languages I would do something like var subVal = val[1] but it seem this method does n... | <p>you should read the basics at: <a href="https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html" rel="nofollow noreferrer">https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html</a> especially the section on Strings and Characters in Swift at: <a href="https://docs.swift.org/swift-book/LanguageGuide/S... | Getting a sub string from a string to show in Text for Swiftui | swift|xcode|swiftui | 0 | 80 | 2 | 72,961,008 | 72,961,008 | 2 | true | 2022-07-13T03:59:48.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting a sub string from a string to show in Text for Swiftui<p>Greeting everyone. I just started my Swiftui journey.</p>
<p>I am trying to get a piece of s... |
72,964,108 | asp.net core, limit MaxRequestBodySize for each API call<p>I like to set the MaxRequestBodySize for an API operation depending on a query string parameter when API operation is called.</p>
<p>Let's say, something like that:</p>
<pre><code> [HttpPost("{para1}")]
[RequestSizeLimit(...when para1 = "a... | <p>If you want to set the MaxRequestBodySize for an API operation, using RequestSizeLimit is right choice. But usually argument should be numbers. For example, this following code would allow <em>PostIt</em> to accept request bodies up to
30,000,000bytes.</p>
<pre><code>[HttpPost]
[... | asp.net core, limit MaxRequestBodySize for each API call | c#|asp.net-core | 2 | 80 | 1 | 72,977,315 | 72,977,315 | 2 | true | 2022-07-13T09:41:45.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
asp.net core, limit MaxRequestBodySize for each API call<p>I like to set the MaxRequestBodySize for an API operation depending on a query string parameter wh... |
72,825,364 | Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted<p>I got the following entity framework error while trying to save edit page</p>
<pre><code> "Store update, insert, or delete statement affected an unexpected number of rows (0). Entitie... | <p>On your Controller Action, the parameter should be the List. You need to iterate and update.</p>
<pre><code> [HttpPost]
public ActionResult Edit(List<RESULT> results)
{
if (ModelState.IsValid)
{
foreach(var item in results)
{
var model =_context... | Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted | c#|asp.net-mvc | 0 | 80 | 3 | 72,826,575 | 72,826,575 | 2 | true | 2022-07-01T06:50:28.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted<p>I got the following entity ... |
72,883,049 | How do you customize the PyQT5 TextBox<p>I have been trying to customised the text box to try and look like this and trying to format the text but so far nothing has worked so i have reverted back to the base code :
<a href="https://i.stack.imgur.com/dzNU0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.... | <p>You can using a QGroupBox, and add the QLineEdit inside the QGroupBox.</p>
<p>You can customize the QGroupBox to have a round corner and the QLineEdit to have a transparent background and no border using stylesheets mentioned by @kalzso.</p>
<p>The following is an example:</p>
<p>File MainWindow.py (generated by pyu... | How do you customize the PyQT5 TextBox | python|pyqt|pyqt5 | 1 | 80 | 1 | 72,884,528 | 72,884,528 | 2 | true | 2022-07-06T11:45:01.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you customize the PyQT5 TextBox<p>I have been trying to customised the text box to try and look like this and trying to format the text but so far not... |
72,789,742 | Which rlang function should I use to evaluate a glue string as a variable name?<p>Suppose that I want to create a function to be used within <code>dplyr::mutate()</code>, and in which I feed a variable name, and within the function, it will extract a particular pattern in the variable name given and create a new variab... | <p>You can use the environment and call <code>eval_tidy()</code>.</p>
<p>This uses <code>caller_env(n = 1)</code>:</p>
<pre class="lang-r prettyprint-override"><code>myfun <- function(var) {
.var <- enexpr(var)
var_name <- as_name(.var)
y <- str_remove(var_name, "^.*\\.")
other_var &... | Which rlang function should I use to evaluate a glue string as a variable name? | r|dplyr|rlang|r-glue | 1 | 80 | 3 | 72,790,138 | 72,790,138 | 2 | true | 2022-06-28T16:00:29.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which rlang function should I use to evaluate a glue string as a variable name?<p>Suppose that I want to create a function to be used within <code>dplyr::mut... |
72,932,123 | How can I get the size of a C object in Rust<p>bindgen has nicely given me</p>
<pre><code>extern "C" {
pub fn Hacl_Bignum4096_new_bn_from_bytes_be(len: u32, b: *mut u8) -> *mut u64;
}
</code></pre>
<p>returning something of type <code>*mut u64</code>. Unfortunately there is no reliable way (that I have... | <p>You write: "having to perform the conversion to a Hacl_Bignum from bytes each and every time feels wasteful". It seems like you are not letting the library do its job. You should not keep a copy of the bignum data in your Rust struct <code>Bignum</code>, but only the pointer you get from the library. Somet... | How can I get the size of a C object in Rust | rust|ffi | 1 | 80 | 1 | 72,936,354 | 72,936,354 | 2 | true | 2022-07-10T21:51:06.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I get the size of a C object in Rust<p>bindgen has nicely given me</p>
<pre><code>extern "C" {
pub fn Hacl_Bignum4096_new_bn_from_bytes... |
72,924,230 | How to fix converting a string bug?<p>I needs to convert base string to target string. I have a working code right now, but if there is a "," character where it says tvg-name, the code is broken and doesn't work. How can I fix this bug?</p>
<p><strong>Base Working String</strong>: <code>{tvg-id: , tvg-name: A... | <p>Instead of normal <code>.split(',')</code>, we can use regular expression to help us handle the split.</p>
<pre class="lang-py prettyprint-override"><code>import re
def convert(example):
kv_pairs = re.split(', (?=\w+-?\w+:)', example[1:-1])
result = {}
for kv_pair in kv_pairs:
key, value = kv_pa... | How to fix converting a string bug? | python|string | 0 | 80 | 4 | 72,924,740 | 72,924,740 | 2 | true | 2022-07-09T19:55:45.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix converting a string bug?<p>I needs to convert base string to target string. I have a working code right now, but if there is a "," chara... |
73,022,082 | Ansible - Repeat a list for N times<p>I have a main playbook that use <code>include</code> to call other playbooks in case conditions are met. That is working fine, but what I need is to execute these playbooks for <code>n</code> times, where <code>n</code> is a user input variable. So, if the user enters "5"... | <p>Just add another <code>include</code> level, and add your sequence loop to that task.</p>
<hr />
<p>First, note that the <code>include</code> module <a href="https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_module.html#deprecated" rel="nofollow noreferrer">has been deprecated</a>. You shou... | Ansible - Repeat a list for N times | list|loops|ansible | 0 | 80 | 2 | 73,022,784 | 73,022,784 | 2 | true | 2022-07-18T12:07:33.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ansible - Repeat a list for N times<p>I have a main playbook that use <code>include</code> to call other playbooks in case conditions are met. That is workin... |
73,012,470 | 1px wide element looks thicker than a border of 1px width<p>I created a box and gave it a border that is 1px wide. I wanted to add a line that goes across it from the top left corner to the bottom right corner, so I used a pseudo element and gave it a height of 1px and a width that is large enough to make it span the e... | <p>It only looks thicker due to the pixelation from being diagonal. In the snippet, hover the first box you will see the lines rotate and appear as thick as the border.</p>
<p>In the second box I have come up with a bit of a workaround. The width of the diagonal lines is halved (0.5) of the default. And then using box ... | 1px wide element looks thicker than a border of 1px width | html|css | 0 | 80 | 2 | 73,012,567 | 73,012,567 | 2 | true | 2022-07-17T14:07:02.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
1px wide element looks thicker than a border of 1px width<p>I created a box and gave it a border that is 1px wide. I wanted to add a line that goes across it... |
72,914,677 | Excel: How to create a dependent drop down list in Excel when the primary has duplicates?<p>I've researched several posts about dependent drop-down lists; however, I'm still stuck. I need to create drop-down list based on a primary list that has duplicates. Most of the examples have the data <a href="https://i.stack.... | <p><strong>EDIT</strong>: updated to a more generic approach, to enable multiple lists as data sources.</p>
<p>Here's one way to do this - it relies on using a named range which refers to a VBA function: that function is called when you click a validation drop-down which refers to the name.</p>
<p>Needs a name defined ... | Excel: How to create a dependent drop down list in Excel when the primary has duplicates? | excel|vba|list|dropdown | -2 | 80 | 1 | 72,918,785 | 72,918,785 | 2 | true | 2022-07-08T16:58:38.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Excel: How to create a dependent drop down list in Excel when the primary has duplicates?<p>I've researched several posts about dependent drop-down lists; ho... |
72,842,003 | Testing type for class conformance in Swift<p><em>EDIT: The previous answers alluded to in the comments don't answer the question, which was how to determine if any given Type was a reference type and how to safely conform said type to AnyObject.</em></p>
<p>Testing against the passed type doesn't work, as the underlyi... | <p>As Martin notes in a comment, any value can be cast to <code>AnyObject</code> in Swift, because Swift will wrap value types in an opaque <code>_SwiftValue</code> class, and the cast will always succeed. There is a way around this, though.</p>
<p>The way to check whether a value is a reference type without this impli... | Testing type for class conformance in Swift | ios|swift|dependency-injection|anyobject | 0 | 80 | 2 | 72,842,173 | 72,842,173 | 2 | true | 2022-07-02T19:44:33.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Testing type for class conformance in Swift<p><em>EDIT: The previous answers alluded to in the comments don't answer the question, which was how to determine... |
72,825,894 | Get all combinations of changing characters in a sring (C++)<p>Okay, I've been tearing my hair out for the past 5 hours on this.</p>
<p>I'm still new to C++, so bear with me if this is a stupid question.</p>
<p>I would like to get all possible character combinations, and put them in a string, in C++.</p>
<pre class="la... | <p>You tagged your question as "recursion", so here is an answer that uses recursion:</p>
<pre><code>void generate(int idx, string& test) {
if (idx == test.size()) {
// do something with test
} else {
for (char c : globals::validChars) {
test[idx] = c;
gener... | Get all combinations of changing characters in a sring (C++) | c++|loops|recursion|cartesian-product | 1 | 80 | 3 | 72,826,111 | 72,826,111 | 2 | true | 2022-07-01T07:38:09.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get all combinations of changing characters in a sring (C++)<p>Okay, I've been tearing my hair out for the past 5 hours on this.</p>
<p>I'm still new to C++,... |
72,879,549 | Why are the contents inside <div> element not clickable?<p>I want to make a button inside of a div, but the content inside the div isn't clickable. My code:</p>
<pre class="lang-html prettyprint-override"><code> <div id="sidebar">
<ul>
<li><img src="img/whitelo... | <p>Can you also provide your CSS code, please?<br />
There aren't any clickable items in the <code>div</code> element.</p>
<pre class="lang-html prettyprint-override"><code><div>
<a>content...</a>
<!-- <button>content</button>-->
</div>
</code></pre>
<p>Hope this helps.... | Why are the contents inside <div> element not clickable? | html|css | -3 | 80 | 3 | 72,879,592 | 72,879,592 | 2 | true | 2022-07-06T07:36:30.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why are the contents inside <div> element not clickable?<p>I want to make a button inside of a div, but the content inside the div isn't clickable. My code:<... |
72,854,179 | Calculating Standard Deviation with JavaScript showing NaN in Textfield<p>so i want to calculate the standard deviation of 10 values from input types.
I am collecting them into an array and want to calculate my standard deviation.</p>
<p>Problem is, it always shows NaN when i run the function (with action "oninput... | <p>Below is a modified example of your code. A couple of notes:</p>
<ul>
<li>When calculating the mean and variance, you were using <code>n</code> in the <code>reduce</code> callbacks, rather than <code>n.value</code></li>
<li>The first <code>reduce</code> function needed an initial value of 0</li>
<li>I used <code>num... | Calculating Standard Deviation with JavaScript showing NaN in Textfield | javascript|arrays | 0 | 80 | 4 | 72,854,480 | 72,854,480 | 2 | true | 2022-07-04T09:00:55.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating Standard Deviation with JavaScript showing NaN in Textfield<p>so i want to calculate the standard deviation of 10 values from input types.
I am c... |
72,822,061 | How to replace decltype(f()) with std::invoke_result_t, where f is a lambda with non-type template parameter?<p>How to replace the following with <code>std::invoke_result_t</code>?</p>
<pre><code>decltype(f.template operator()<0>())
</code></pre>
<p>Here's more context:</p>
<pre><code>template <size_t I, typen... | <p>You still need <code>decltype</code>, because <code>invoke_result_t</code> requires the type of the method followed by the type of the class. But here you go:</p>
<pre><code>#include <cstddef>
#include <type_traits>
template <size_t I, typename Functor>
consteval auto apply(Functor&& f)
{... | How to replace decltype(f()) with std::invoke_result_t, where f is a lambda with non-type template parameter? | c++|c++20|typetraits | 0 | 80 | 1 | 72,822,733 | 72,822,733 | 2 | true | 2022-06-30T21:09:30.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace decltype(f()) with std::invoke_result_t, where f is a lambda with non-type template parameter?<p>How to replace the following with <code>std::... |
72,822,872 | Python PyQt6 contextMenuEvent strange behavior I don't understand<p>I have the following code giving me trouble:</p>
<pre><code>class TableView(qt.QTableView):
def __init__(self, param):
super().__init__()
self.model = param.model
self.view = self
self.mains = [QAction('Remove row'),... | <p>There are two main problems with your code:</p>
<ol>
<li>variables inside lambdas are evaluated at execution, so <code>e</code> always corresponds to the <em>last</em> reference assigned in the loop;</li>
<li>when a signal is emitted, functions are called as many times they have been connected: each time you create ... | Python PyQt6 contextMenuEvent strange behavior I don't understand | python|pyqt6 | 0 | 80 | 1 | 72,823,530 | 72,823,530 | 2 | true | 2022-06-30T23:04:50.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python PyQt6 contextMenuEvent strange behavior I don't understand<p>I have the following code giving me trouble:</p>
<pre><code>class TableView(qt.QTableView... |
72,831,564 | Is it possible to pass one of the standard function templates as an argument without using a lambda?<p>For example, <code>std::get<N></code>.</p>
<p>Can I do the following without using a lambda somehow?</p>
<pre><code>#include <iostream>
#include <tuple>
#include <algorithm>
#include <vector... | <p>You don't <em>have</em> to use a lambda. You could provide an instance of your own type if you'd like:</p>
<pre><code>struct transformer {
auto operator()(const auto& tup) const { // auto C++20
return std::get<0>(tup);
}
};
std::vector<std::string> just_strings(const std::vector<s... | Is it possible to pass one of the standard function templates as an argument without using a lambda? | c++ | 1 | 80 | 2 | 72,831,787 | 72,831,787 | 3 | true | 2022-07-01T15:33:22.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to pass one of the standard function templates as an argument without using a lambda?<p>For example, <code>std::get<N></code>.</p>
<p>Ca... |
72,955,457 | How to stack columns/series vertically in pandas<p>I currently have a dataframe that looks something like this</p>
<pre><code>entry_1 entry_2
2022-01-21 2022-02-01
2022-03-23 NaT
2022-04-13 2022-06-06
</code></pre>
<p>however I need to vertically stack my two columns to get something like this</p>
<pre><code... | <p>I recommend that you use</p>
<pre><code>pd.DataFrame(df.values.ravel(), columns=['all_entries'])
</code></pre>
<p>This will allow you to return the flattened underlying data as an ndarray. By wrapping that in <code>pd.Dataframe()</code> you will convert it back to a dataframe with the column name "all_entries&... | How to stack columns/series vertically in pandas | python|pandas|dataframe | 2 | 80 | 2 | 72,955,859 | 72,955,859 | 3 | true | 2022-07-12T16:22:24.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to stack columns/series vertically in pandas<p>I currently have a dataframe that looks something like this</p>
<pre><code>entry_1 entry_2
2022-01-21... |
72,974,915 | 1 + 2 + 3 + 4 + … + n > limit value (the input is a limit value)<p>How do I program in Java to get the smallest positive integer n that satisfies the criteria:<br />
1 + 2 + 3 + 4 + … + n > limit value (the input is a limit value)</p>
<p>Example:<br />
The input: 6. Then n is 4 (1 + 2 + 3 + 4 > limit value, 10 &g... | <p>Try switching these 2 statements:</p>
<pre><code>sum = sum + n;
n++;
</code></pre>
<p>So it becomes</p>
<pre><code>n++;
sum = sum + n;
</code></pre>
<p>Because right now you first add <code>n</code> to <code>sum</code> (which is 0 in the first loop) and then increase <code>n</code> but it should be the other way I b... | 1 + 2 + 3 + 4 + … + n > limit value (the input is a limit value) | java | -1 | 80 | 3 | 72,976,187 | 72,976,187 | 3 | true | 2022-07-14T03:37:46.117Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
1 + 2 + 3 + 4 + … + n > limit value (the input is a limit value)<p>How do I program in Java to get the smallest positive integer n that satisfies the criteri... |
72,802,894 | Nested concept types in templates<p>Consider the following template, intended on declaring some <code>State::Machine</code>:</p>
<pre><code>enum Strategy {
Breadth,
Depth,
Heuristic,
};
template<class Map, Strategy Strategy = Depth>
struct Machine;
</code></pre>
<p>If we would like to enforce some const... | <p>Most types expose their "subtypes".
<a href="https://en.cppreference.com/w/cpp/container/map" rel="nofollow noreferrer"><code>std::map</code></a> has <code>key_type</code> and <code>mapped_type</code> for example.</p>
<p>(You can create traits to extract template parameter if needed BTW, if type doesn't pr... | Nested concept types in templates | c++|templates|c++20|c++-concepts | 0 | 80 | 1 | 72,804,926 | 72,804,926 | 3 | true | 2022-06-29T14:14:01.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nested concept types in templates<p>Consider the following template, intended on declaring some <code>State::Machine</code>:</p>
<pre><code>enum Strategy {
... |
72,874,439 | What's going on, when trying to print uninitialized string<p>I'm just decided to test <code>malloc</code> and <code>new</code>. Here is a code:</p>
<pre><code>#include <iostream>
#include <string>
struct C
{
int a = 7;
std::string str = "super str";
};
int main()
{
C* c = (C*)malloc(... | <p>You've used <code>malloc</code>. One of the reasons to not do this is that it hasn't actually initialized your object. It's just allocated memory for it. As a result, when accessing member fields, you get undefined behavior.</p>
<p>You have also forgotten to <code>delete</code> the <code>C</code> object you created ... | What's going on, when trying to print uninitialized string | c++ | -3 | 80 | 2 | 72,874,485 | 72,874,485 | 3 | true | 2022-07-05T19:11:14.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's going on, when trying to print uninitialized string<p>I'm just decided to test <code>malloc</code> and <code>new</code>. Here is a code:</p>
<pre><cod... |
73,022,715 | Laravel 9 - SQLSTATE[HY000]: General error: 1364 Field 'order_id' doesn't have a default value<p>Hello i'm trying to insert data to db that have to be split in 2 related tables. For now i'm using some dummy values.</p>
<p>Table 1:</p>
<pre><code> Schema::create('orders_grid', function (Blueprint $table) {
... | <p>Just update on last else condition in the controller</p>
<pre><code>else {
$insert_id = DB::table('orders_grid')->insertGetId($data_grid);
$data_detail['order_id'] = $insert_id;
DB::table('orders_detail')->insert($data_detail);
return redirect()->back()->with('message', 'F... | Laravel 9 - SQLSTATE[HY000]: General error: 1364 Field 'order_id' doesn't have a default value | php|mysql|laravel|model-view-controller | 1 | 80 | 1 | 73,022,900 | 73,022,900 | 3 | true | 2022-07-18T13:00:46.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel 9 - SQLSTATE[HY000]: General error: 1364 Field 'order_id' doesn't have a default value<p>Hello i'm trying to insert data to db that have to be split ... |
72,971,535 | yq add property to object somewhere in the tree<p>I'm trying to add a response to all objects with the key <code>responses</code> in an open api yaml file. I tried a lot and failed hard because I think I miss some basic understanding but I don't know what exactly.</p>
<p><strong>File</strong></p>
<pre><code>openapi: 3.... | <p>You were almost there. Just wrap the whole search on the LHS into parentheses to eventually retain the outer context:</p>
<pre class="lang-bash prettyprint-override"><code>(.. | select(has("responses")).responses) += {"xxx": {"description": "yyy"}}
</code></pre>
<p>Note: I hav... | yq add property to object somewhere in the tree | yaml|openapi|yq | 0 | 80 | 1 | 72,971,654 | 72,971,654 | 3 | true | 2022-07-13T19:18:35.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
yq add property to object somewhere in the tree<p>I'm trying to add a response to all objects with the key <code>responses</code> in an open api yaml file. I... |
72,904,421 | How to call a referenced lambda?<p>I'm trying to call a function (lambda) stored within an alist. Below is a small snippet that demonstrates what I'm trying to do:</p>
<pre><code>(defvar *db* '((:add (lambda (a b)
(+ a b)))
(:sub (lambda (a b)
(- a b)))))
(d... | <p>As pointed out by other answers, you are manipulating code as data, where the forms below <code>(lambda ...)</code> are unevaluated. But even with your data:</p>
<pre><code>(defvar *db* '((:add (lambda (a b)
(+ a b)))
(:sub (lambda (a b)
(- a b)))))
</code... | How to call a referenced lambda? | lisp|common-lisp | 2 | 80 | 3 | 72,916,475 | 72,916,475 | 3 | true | 2022-07-07T21:27:44.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to call a referenced lambda?<p>I'm trying to call a function (lambda) stored within an alist. Below is a small snippet that demonstrates what I'm trying ... |
72,969,795 | Matplotlib won't follow date format set by set_major_formatter or set_minor_formatter for some datasets<p>I am using a program to make a plot of a pandas dataframe with date and time on the x axis and a variable on the y axis. I would like the plot to show the date and time for each tick on the x axis in yyyy-mm-dd hh:... | <p>The code below side steps the issue by avoiding the pandas plotting defaults.
You get the same x-axis format for all cases.</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
from matplotlib import pyplot as plt
from matplotlib import dates as mdates
df = pd.DataFrame(
[['2022-01-01 01:00',... | Matplotlib won't follow date format set by set_major_formatter or set_minor_formatter for some datasets | python|pandas|dataframe|datetime|matplotlib | 2 | 80 | 1 | 72,974,556 | 72,974,556 | 3 | true | 2022-07-13T16:42:11.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Matplotlib won't follow date format set by set_major_formatter or set_minor_formatter for some datasets<p>I am using a program to make a plot of a pandas dat... |
72,929,308 | Calculating Euclidean Distance<p>I have the code below to calculate Euclidean Distance. however, my function does basically nothing. It gives no output and not even an error, it just runs and finishes.</p>
<pre><code>lst_a=[1,2,3,4,5]
lst_b=[1,2,4,5,8]
def distance(lst_a, lst_b):
sum_of = 0
for x, y in zip(lst... | <p>Have you called the function?</p>
<pre><code>distance(lst_a, lst_b)
</code></pre>
<p>Output:</p>
<pre><code>3.3166247903554
</code></pre>
<p>For longer lists, you can also do this faster by summing a generator expression instead:</p>
<pre><code>def distance(lst_a, lst_b):
return sum((x-y)**2 for x, y in zip(lst_... | Calculating Euclidean Distance | python|euclidean-distance | -1 | 80 | 1 | 72,929,333 | 72,929,333 | 3 | true | 2022-07-10T14:40:18.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating Euclidean Distance<p>I have the code below to calculate Euclidean Distance. however, my function does basically nothing. It gives no output and n... |
72,972,844 | Move coordinates a set distance in meters<p>In SQL Server I want to be able to take a single latitude and longitude (51.500709, -0.124646) and move these coordinates 50 meters north, but I'm not sure how to do this. I am aware of the geography spatial data type and have used the <code>STDistance</code> function to get ... | <p>I was curious about the <code>n/111111</code> approach in the link provided by Mitch.</p>
<p>I am pleased to report it <em><strong>"Ain't half bad</strong></em>". In this example, we were 0.06 meters (2.3 inches) off.</p>
<p><strong>Example</strong></p>
<pre><code>Declare @Lat float = 51.500709
Declare ... | Move coordinates a set distance in meters | sql-server|sqlgeography | 1 | 80 | 2 | 72,973,225 | 72,973,225 | 3 | true | 2022-07-13T21:30:12.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Move coordinates a set distance in meters<p>In SQL Server I want to be able to take a single latitude and longitude (51.500709, -0.124646) and move these coo... |
72,824,718 | Problem with specific fields while querying mongoDB<p>The problem is with these two fields : <code>Relative Time(h:min:s.ms)</code> and <code>Real time(h:min:s.ms)</code></p>
<p>The values cannot be retrieved While trying to export the collection to csv/json. So I tried the following:</p>
<ol>
<li>full query, able to g... | <p>Apparently, the issue is with dot (<code>.</code>) in key name <em><code>Relative Time(h:min:s.ms)</code>, <code>Real time(h:min:s.ms)</code></em>,</p>
<p>There are so many <a href="https://www.mongodb.com/docs/manual/core/dot-dollar-considerations/" rel="nofollow noreferrer">restrictions and limitations</a> if the ... | Problem with specific fields while querying mongoDB | mongodb|datetime|mongodb-query|export|data-retrieval | 2 | 80 | 1 | 72,853,785 | 72,853,785 | 3 | true | 2022-07-01T05:24:56.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem with specific fields while querying mongoDB<p>The problem is with these two fields : <code>Relative Time(h:min:s.ms)</code> and <code>Real time(h:min... |
72,836,580 | Question about values out of bounds of an array in C<p>I have a question about this code below:</p>
<pre><code>#include <stdio.h>
char abcd(char array[]);
int main(void)
{
char array[4] = { 'a', 'b', 'c', 'd' };
printf("%c\n", abcd(array));
return 0;
}
char abcd(char array[])
{
char... | <p>OP seems to think accessing an array out-of-bounds, something special should happen.</p>
<p>Accessing outside array bounds is <em>undefined behavior</em> (UB). Anything may happen.</p> | Question about values out of bounds of an array in C | arrays|c|pointers | 1 | 80 | 4 | 72,836,675 | 72,836,675 | 4 | true | 2022-07-02T05:02:51.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Question about values out of bounds of an array in C<p>I have a question about this code below:</p>
<pre><code>#include <stdio.h>
char abcd(char array... |
72,893,579 | Nanoid library not working as a thingsboard resource<p>I need to generate a 10 character id for a project in Thingsboard, i'm facing a problem with the nanoid lib. I need to use the cdnjs so i've tried first with the 4.0 version (the index.browser.min.js one) and it's giving me this problem as soon as i click on execut... | <pre><code>self.onInit = function() {
import('https://cdn.jsdelivr.net/npm/nanoid/nanoid.js').then(
nanoid => {
console.log(nanoid.nanoid());
}
);
}
</code></pre> | Nanoid library not working as a thingsboard resource | javascript|import|thingsboard|nanoid | 2 | 80 | 1 | 72,900,643 | 72,900,643 | 4 | true | 2022-07-07T07:06:29.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nanoid library not working as a thingsboard resource<p>I need to generate a 10 character id for a project in Thingsboard, i'm facing a problem with the nanoi... |
72,934,289 | Get SUM() after GROUP BY<p>So I have a table name "sumTable"</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>year</th>
<th>Orders</th>
</tr>
</thead>
<tbody>
<tr>
<td>1996-07-04 00:00:00.000</td>
<td>2</td>
</tr>
<tr>
<td>1996-10-15 00:00:00.000</td>
<td>3</td>
</tr>
<tr>
<td>1997... | <p>For your requirement you want a single row for the sum of all qualifying rows - you are not grouping anything so there is no need for <code>group by</code>.</p>
<pre><code>Select sum (Orders) as Total_orders
from SumTable
where [year] >='19960101' and [year] < '19970101';
</code></pre>
<p>You would want <em>gr... | Get SUM() after GROUP BY | tsql|group-by|sum | 0 | 80 | 1 | 72,935,865 | 72,935,865 | 4 | true | 2022-07-11T06:01:29.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get SUM() after GROUP BY<p>So I have a table name "sumTable"</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>year</th>... |
72,937,886 | How to randomly change rgb color?<p>In the application, when you click on the screen, you need to change the color to random, but it must be in RGB format. How can I get a random RGB color?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<p... | <p>You can do like this</p>
<pre><code>class _HomePageState extends State<HomePage> {
Random random = Random();
Color _color = Colors.white;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Color picker"),
cen... | How to randomly change rgb color? | flutter|dart | 1 | 80 | 3 | 72,938,075 | 72,938,075 | 4 | true | 2022-07-11T11:31:50.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to randomly change rgb color?<p>In the application, when you click on the screen, you need to change the color to random, but it must be in RGB format. H... |
72,908,829 | What is the difference between `#[cfg(test)]` and `#[cfg(feature = "test")]`?<p>I would like to understand the difference between <code>#[cfg(test)]</code> and <code>#[cfg(feature = "test")]</code>, preferably demonstrated through examples.</p> | <p><code>#[cfg(test)]</code> marks something to be compiled only when the <code>test</code> config option is enabled, while <code>#[cfg(feature = "test")]</code> marks something to be compiled only when the <code>feature = "test"</code> config option is enabled.</p>
<p><a href="https://doc.rust-lang... | What is the difference between `#[cfg(test)]` and `#[cfg(feature = "test")]`? | rust | 1 | 80 | 1 | 72,909,751 | 72,909,751 | 4 | true | 2022-07-08T08:41:34.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the difference between `#[cfg(test)]` and `#[cfg(feature = "test")]`?<p>I would like to understand the difference between <code>#[cfg(test)]</code> a... |
72,883,284 | Splitting str in list<p>I'm trying to write a function that returns list of lists with all possible combination.</p>
<p>It's supposed to return this:</p>
<pre><code>[['Moscow', 'Oslo', 'Boston', 'Berlin'],
['Moscow', 'Oslo', 'Sydney', 'Berlin'],
['Moscow', 'Paris', 'Boston', 'Berlin'],
['Moscow', 'Paris', 'Sydney', ... | <p>This will do precisely what you specified:</p>
<pre><code>def pathway(city_from, city_array, city_to):
return [[city_from, *c, city_to]
for c in itertools.product(*city_array)]
</code></pre> | Splitting str in list | python|python-3.x|list | 4 | 80 | 2 | 72,883,385 | 72,883,385 | 4 | true | 2022-07-06T12:05:53.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Splitting str in list<p>I'm trying to write a function that returns list of lists with all possible combination.</p>
<p>It's supposed to return this:</p>
<pr... |
72,989,729 | How to generate a XML tag without tail "/"?<p>I'm trying to make a XML document. Especially,
as below</p>
<pre><code><spirit:component xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.4"
xmlns:vendorExtensions="$IREG_GEN/XMLSchema/SPIRIT"
xmlns... | <p>In XML, a tag without any children or other enclosed content can be, and typically is, written as a single <em>empty-element</em> form <code><foo/></code> instead of <code><foo></foo></code>. It needs to be one or the other, though; unlike HTML, in XML every opening tag needs a closing one. So ther... | How to generate a XML tag without tail "/"? | xml|perl | 2 | 80 | 1 | 72,990,770 | 72,990,770 | 5 | true | 2022-07-15T06:13:41.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to generate a XML tag without tail "/"?<p>I'm trying to make a XML document. Especially,
as below</p>
<pre><code><spirit:component xmlns:spirit="... |
72,834,021 | SQL - Decaying Time Since Event Then Starting Over At the Next Event<p>There are many similar questions and answers already posted but I could not find one with these differences. 1) The count of NULLs starts over, and 2) there is a math function applied to the replaced value.</p>
<p>An event either takes place or not ... | <p>The query could be simplified by using <a href="https://docs.snowflake.com/en/sql-reference/functions/conditional_change_event.html" rel="nofollow noreferrer">CONDITIONAL_CHANGE_EVENT</a> to generate subgrp helper column:</p>
<pre><code>WITH cte AS (
SELECT *, CONDITIONAL_CHANGE_EVENT(event IS NULL) OVER(PARTITION... | SQL - Decaying Time Since Event Then Starting Over At the Next Event | sql|snowflake-cloud-data-platform|missing-data | 3 | 80 | 1 | 72,834,280 | 72,834,280 | 5 | true | 2022-07-01T19:47:19.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL - Decaying Time Since Event Then Starting Over At the Next Event<p>There are many similar questions and answers already posted but I could not find one w... |
72,836,555 | How can I delink an element from a c++ std::list without deallocating it?<p>Suppose I have a c++ <code>std::list</code> object containing a few elements and an iterator <code>it</code> to one of the elements. How can I remove this element from the list but still be able to access it? In other words, I want it delinked ... | <p>This can be done provided you don't mind using a second list to receive the erased item</p>
<pre><code>auto it = (--a.end());
std::list<int> b;
b.splice(b.end(), a, it);
cout << *it << endl; /// outputs '3'
</code></pre>
<p><code>splice</code> removes the <code>it</code> element from list <code>a... | How can I delink an element from a c++ std::list without deallocating it? | c++|list|stl|iterator|contains | 1 | 80 | 1 | 72,836,752 | 72,836,752 | 6 | true | 2022-07-02T04:57:00.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I delink an element from a c++ std::list without deallocating it?<p>Suppose I have a c++ <code>std::list</code> object containing a few elements and ... |
72,771,118 | Filtering through a list of results in Python<p>Brand new to learning Python, but very familiar with Google Sheets -- I'm essentially trying to mimic the "filter" function but cannot find anything on it.</p>
<p>The goal of my script is to pull the social media tags of NBA players (from the URLs).</p>
<p>I hav... | <p>You can use the <code>in</code> keyword to search for substrings. In your case, you could check each profile like so:</p>
<pre><code>if "https://www.facebook.com" in profile:
print(profile)
</code></pre>
<p><code>in</code> returns True if it finds the substring.</p> | Filtering through a list of results in Python | python|web-scraping|beautifulsoup|q|get-request | 0 | 81 | 3 | 72,771,221 | 72,771,221 | 0 | true | 2022-06-27T11:10:34.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filtering through a list of results in Python<p>Brand new to learning Python, but very familiar with Google Sheets -- I'm essentially trying to mimic the &qu... |
72,771,760 | Updating library version in Google Colab<p>Google Colab currently uses version 0.10.2 of the Statsmodels library. However, I want to update this to the latest library of Statsmodels (0.13.0).</p>
<pre><code>In[1]: statsmodels.__version__
Out[1]: '0.10.2'
</code></pre>
<p>The pre-requisits for using the latest version o... | <p>By placing '!' (apostrophes excluded) at the beginning of the command in Colab, you will run it as if you were running it inside a terminal window and it should be updated in Colab.</p>
<p>Example:</p>
<p><code>!pip install statsmodels==0.13.0</code></p>
<p>Let me know if this solved your issue. Good luck with your ... | Updating library version in Google Colab | python|statsmodels | 0 | 81 | 1 | 72,771,851 | 72,771,851 | 0 | true | 2022-06-27T12:02:19.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Updating library version in Google Colab<p>Google Colab currently uses version 0.10.2 of the Statsmodels library. However, I want to update this to the lates... |
72,788,997 | Why does scrolling not work correctly when using WindowCompat.setDecorFitsSystemWindows(window, false)?<p>It looks like when I add</p>
<pre><code>WindowCompat.setDecorFitsSystemWindows(window, false)
</code></pre>
<p>to my Android app, scrolling through the content on the screen while the keyboard is open is broken. It... | <p>Figured it out. I need to update the insets when they change. See code.</p>
<pre><code>package com.example.myapplication
import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import android.view.WindowInsets
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.WindowCo... | Why does scrolling not work correctly when using WindowCompat.setDecorFitsSystemWindows(window, false)? | android|android-constraintlayout|android-scrollview|material-components-android | 0 | 81 | 1 | 72,789,871 | 72,789,871 | 0 | true | 2022-06-28T15:10:26.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does scrolling not work correctly when using WindowCompat.setDecorFitsSystemWindows(window, false)?<p>It looks like when I add</p>
<pre><code>WindowCompa... |
72,796,170 | Pass Flatlist value item to another Navigation Container React Native<p>I try to pass flatlist item value to other screen (main navigator), but it always return undefined. I want to achieve that when user onPress(), it will pass the value into the new screen, because I need it in the tab navigator screens. I already tr... | <p>From this given code i think you are destructuring props in the wrong way thats why its undefined.</p>
<pre><code>const MainNavigator = (route,navigation) => {
const {nameChild} = route.params;
}
export default MainNavigator;
</code></pre>
<p><strong>Try this.</strong></p>
<pre><code>const MainNavigator = (pr... | Pass Flatlist value item to another Navigation Container React Native | react-native|routes|parameter-passing|react-native-flatlist|flatlist | 0 | 81 | 2 | 72,796,269 | 72,796,269 | 0 | true | 2022-06-29T05:27:36.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass Flatlist value item to another Navigation Container React Native<p>I try to pass flatlist item value to other screen (main navigator), but it always ret... |
72,808,269 | Flask. add() takes from 2 to 3 positional arguments but 4 were given<p>I'm a student making a simple wishlist website with user entered data through Flask and SQLalchemy. I've been struggling with this issue and many others ever since I added some new columns to my database. The user inputs the fields through an HTML f... | <p>Fixed my issue with some help from a friend.</p>
<pre><code>@app.route("/add", methods=["GET", "POST"])
def add():
if request.method == 'POST':
item_content = request.form.get('content')
item_price = request.form.get('price')
item_link = request.form.get('lin... | Flask. add() takes from 2 to 3 positional arguments but 4 were given | python|sqlalchemy|flask-sqlalchemy | 0 | 81 | 2 | 72,810,378 | 72,810,378 | 0 | true | 2022-06-29T21:54:34.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flask. add() takes from 2 to 3 positional arguments but 4 were given<p>I'm a student making a simple wishlist website with user entered data through Flask an... |
72,823,393 | Problem with optional non-capturing group in Regex<p>I am trying to do regex parsing and matching and optionally discard the rest of the string.</p>
<p>My strings are of type:</p>
<p>[GROUP 1][delimiter 1][GROUP 2][delimiter 2][GROUP 3][delimiter 3 - optional][REST OF THE STRING - optional]</p>
<p>For example:</p>
<pre... | <p>If the 3rd group has <code>(</code> as a delimiter, you can use a <a href="https://www.regular-expressions.info/charclass.html#negated" rel="nofollow noreferrer">negated character class</a> to exclude matching a <code>(</code> char.</p>
<p>Note that using <code>*</code> as a quantifier can also match an empty string... | Problem with optional non-capturing group in Regex | regex|regex-group | 1 | 81 | 1 | 72,826,156 | 72,826,156 | 0 | true | 2022-07-01T00:54:47.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem with optional non-capturing group in Regex<p>I am trying to do regex parsing and matching and optionally discard the rest of the string.</p>
<p>My st... |
72,836,277 | Status tracking and props in hooks - How does React keeps (track) state and props in Hooks?<p>I know that in React class components React uses the "this" binding to "track" props and state. In hooks it is achieved thanks to closures, is my doubt?</p>
<pre><code>function Counter() {
const [count, s... | <p>React keeps track of state by internally counting the number of times <code>useState</code> is called the first time a component mounts. The value passed into <code>useState</code> is then set into React's internal state. For example, given</p>
<pre><code>const Component = () => {
const [state1, setState1] = us... | Status tracking and props in hooks - How does React keeps (track) state and props in Hooks? | javascript|reactjs|react-hooks|closures|react-props | 0 | 81 | 1 | 72,836,298 | 72,836,298 | 0 | true | 2022-07-02T03:34:42.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Status tracking and props in hooks - How does React keeps (track) state and props in Hooks?<p>I know that in React class components React uses the "this... |
72,769,227 | How to authenticate calls from a Zoho Desk Extension using a custom API key?<p>I am trying to integrate my app with Zoho Desk by creating a <a href="https://www.zoho.com/desk/extensions/guide/#channel-integration-introduction" rel="nofollow noreferrer">Zoho Desk Extension</a>.</p>
<p>I want all the calls generated by t... | <p>I got an answer from Zoho support about this:</p>
<blockquote>
<p>Please note that for custom connections, the API key is internally
handled by sigma and will not be passed in the header. If you want
the API key, you would have to pass the API key as a config param
manually. Once passed, the API key can be fetched ... | How to authenticate calls from a Zoho Desk Extension using a custom API key? | zoho | 1 | 81 | 1 | 72,842,707 | 72,842,707 | 0 | true | 2022-06-27T08:39:38.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to authenticate calls from a Zoho Desk Extension using a custom API key?<p>I am trying to integrate my app with Zoho Desk by creating a <a href="https://... |
72,829,545 | CS50 Pset 1 Mario More<p>I'm solving Mario More comfortable in CS50 Pset 1, I did like most of it, and this is my code:</p>
<pre><code>#include <cs50.h>
#include <stdio.h>
int main(void)
{
int height, i2, i;
do
{
height = get_int("Height: ");
}
while(height < 1 || heigh... | <p>If I am reading your question correctly, you want to produce a pyramid (or isosceles triangle) on the terminal like the following example (FYI, I have just one space).</p>
<pre><code>Height: 8
# #
## ##
### ###
#### ####
##### #####
###### ######
####### #######
######## ########
</code>... | CS50 Pset 1 Mario More | c|cs50 | -1 | 81 | 1 | 72,847,605 | 72,847,605 | 0 | true | 2022-07-01T12:51:23.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CS50 Pset 1 Mario More<p>I'm solving Mario More comfortable in CS50 Pset 1, I did like most of it, and this is my code:</p>
<pre><code>#include <cs50.h>... |
72,847,561 | How to pass the selected ListTile to another screen?<p>The page displays the US states as a list. And when you click on the ListTile, a checkmark appears next to the state. The user can only select one state. How to track the state on which the click was made and transfer it to another screen? Send on button click &quo... | <p>Create a variable like this on top</p>
<pre><code>int currentIndex = 0;
</code></pre>
<p>Whenever a list is selected update this index</p>
<pre class="lang-dart prettyprint-override"><code>void _checkState(int index) {
setState(
() {
for (var i = 0; i < _checkedValue.length; i++) {
_checkedVal... | How to pass the selected ListTile to another screen? | flutter|dart | 1 | 81 | 3 | 72,847,653 | 72,847,653 | 0 | true | 2022-07-03T15:05:21.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass the selected ListTile to another screen?<p>The page displays the US states as a list. And when you click on the ListTile, a checkmark appears nex... |
72,835,951 | Add/Update Google Sheet Row Data Comparing Values from HTML Form Using Google Apps Script - Trying to Find Match on Sheet & Update Selected Row Data<p>I have an HTML form that allows users to populate the form from a Google Sheet, and successfully add new rows to the Sheet. I created the Apps Script according to <a hre... | <p>I believe your goal is as follows.</p>
<ul>
<li>When the HTML form is submitted, you want to check the values of <code>firstName</code> and <code>lastName</code> from the Spreadsheet. And, when those values are existing in the Spreadsheet, you want to update the row. When those values are not existing in the Spreads... | Add/Update Google Sheet Row Data Comparing Values from HTML Form Using Google Apps Script - Trying to Find Match on Sheet & Update Selected Row Data | javascript|forms|for-loop|google-apps-script|google-sheets | 0 | 81 | 1 | 72,850,497 | 72,850,497 | 0 | true | 2022-07-02T01:58:04.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add/Update Google Sheet Row Data Comparing Values from HTML Form Using Google Apps Script - Trying to Find Match on Sheet & Update Selected Row Data<p>I have... |
72,856,792 | Migrating a CommonJS 'module.exports = function()' to ESM<p>I am using NodeJS and have been writing JavaScript for a few years now and am still learning.</p>
<p>For my CJS modules, I write (what I call) a root function that contains all of (what I call) my sub-functions and then <code>return {subfunction1, subfunction2... | <p><code>service.js</code></p>
<pre><code>function WebexService(webex) {
async function processMessage(messageData) {
try {
const user = await webex.people.get(messageData.personId);
//debug(user);
sendMessage({ displayName: user.displayName, roomId: messageData.roomId });
} catch (error) {
... | Migrating a CommonJS 'module.exports = function()' to ESM | javascript|node.js|es6-modules|commonjs|webex | 0 | 81 | 1 | 72,856,949 | 72,856,949 | 0 | true | 2022-07-04T12:29:39.883Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Migrating a CommonJS 'module.exports = function()' to ESM<p>I am using NodeJS and have been writing JavaScript for a few years now and am still learning.</p>... |
72,865,655 | Create an exception for empty dataframe in pandas<p>how to use try: and raise exception: for empty dataframe.</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
name_dict = {'name': [], 'score':[]}
df = pd.DataFrame(name_dict)
print(df)
</code></pre> | <p>Use <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.empty.html" rel="nofollow noreferrer"><code>pandas.DataFrame.empty</code></a> attribute</p>
<pre><code>import pandas as pd
df = pd.DataFrame()
if df.empty:
raise Exception("DataFrame must not be empty")
</code></pr... | Create an exception for empty dataframe in pandas | python|pandas | -2 | 81 | 1 | 72,865,695 | 72,865,695 | 0 | true | 2022-07-05T07:39:18.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create an exception for empty dataframe in pandas<p>how to use try: and raise exception: for empty dataframe.</p>
<pre class="lang-py prettyprint-override"><... |
72,890,787 | what should i do to make this SQL query work?<pre><code>SELECT s.Name, (
COUNT(*) FROM (SELECT 1 FROM pruefen p WHERE p.MatrNr = s.MatrNr AND p.Note < 5) /
COUNT(*) FROM (SELECT 1 FROM pruefen p WHERE p.MatrNr = s.MatrNr)
) as Anteil FROM Studenten s
ORDER BY Anteil DESC, s.Name ASC
LIMIT 10;
</code></pre> | <p>I'm quite sure this query will work; meaning that it won't return an error but I'm not certain if it will return correct result as what you intended:</p>
<pre><code>SELECT s.Name,
SUM(p.Note=5)/COUNT(*) as Anteil
FROM Studenten s
JOIN pruefen p ON p.MatrNr = s.MatrNr
GROUP BY s.Name
ORDER BY Anteil DESC, s... | what should i do to make this SQL query work? | mysql|sql | -5 | 81 | 1 | 72,890,953 | 72,890,953 | 0 | true | 2022-07-06T23:20:06.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what should i do to make this SQL query work?<pre><code>SELECT s.Name, (
COUNT(*) FROM (SELECT 1 FROM pruefen p WHERE p.MatrNr = s.MatrNr AND p.Note < 5) ... |
72,873,661 | Receiving 404 for maven-metadata.xml from Artifactory remote repo of repo.grails.org<p>I am trying to setup the <a href="https://repo.grails.org/core" rel="nofollow noreferrer">https://repo.grails.org/core</a> repository as a remote repository on my artifactory instance. If I use that URL directly in the configuration... | <p>From our previous experience, it was understood that grails repository <code>core</code> that you are pointing to is a virtual repository. grails admins might have added all the remote and local repositories under this. But artifactory does not support virtual repositories for smart remote repositories. You may need... | Receiving 404 for maven-metadata.xml from Artifactory remote repo of repo.grails.org | maven|artifactory|remote-repository | 0 | 81 | 1 | 72,893,580 | 72,893,580 | 0 | true | 2022-07-05T17:55:10.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Receiving 404 for maven-metadata.xml from Artifactory remote repo of repo.grails.org<p>I am trying to setup the <a href="https://repo.grails.org/core" rel="n... |
72,894,107 | How to connect kubernetes deployment having multiple containers to multiple service ports of a single service?<p>I have a scenario like:</p>
<ol>
<li>Have a single deployment containing two containers and have different ports like:</li>
</ol>
<pre><code> template: {
spec: {
containers: [
{
name: contain... | <p>I am trying to re-produce this using <a href="https://kind.sigs.k8s.io/" rel="nofollow noreferrer">kind</a> and I can't. Here is my cluster config file:</p>
<pre><code>apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30000
hostPort:... | How to connect kubernetes deployment having multiple containers to multiple service ports of a single service? | kubernetes | 0 | 81 | 2 | 72,895,781 | 72,895,781 | 0 | true | 2022-07-07T07:48:57.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to connect kubernetes deployment having multiple containers to multiple service ports of a single service?<p>I have a scenario like:</p>
<ol>
<li>Have a ... |
72,902,228 | Jupyter Notebook (ipynb) in Visual Studio Code not running due to "OS Error: [WinError 1392]"<p>I restarted my computer, opened an ipynb file I had and tried to run the first cell. This is all to say, I didn't change anything fundamental in the code.</p>
<p>The first cell is just imports (import gym, import matplotlib ... | <p>Yes, completely deleting Python (by uninstalling from programs and removing from PATH, as described <a href="https://www.pythoncentral.io/how-to-uninstall-python/" rel="nofollow noreferrer">here</a>) and then re-installing it fixed my issue.</p> | Jupyter Notebook (ipynb) in Visual Studio Code not running due to "OS Error: [WinError 1392]" | python|visual-studio-code|jupyter-notebook|oserror | 0 | 81 | 1 | 72,902,633 | 72,902,633 | 0 | true | 2022-07-07T17:49:13.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jupyter Notebook (ipynb) in Visual Studio Code not running due to "OS Error: [WinError 1392]"<p>I restarted my computer, opened an ipynb file I had and tried... |
72,908,878 | How to mark a specific mail as read using node-imap<p>I develop both the frontend and backend of a custom intern application, in which you can receive and read mails using the <strong>node-imap</strong> package.</p>
<p>There is a property you can set so that whenever an unread mail is fetched it gets set as read, but t... | <p><strong>I have found an answer to my problem !</strong></p>
<p>There is no need to actually bind an email to its UID, you can retrieve emails by their messageId.
Here is how you can set a single email as read:</p>
<pre><code>async function setEmailRead (messageId) {
const imap = new Imap(imapConfig)
imap.onc... | How to mark a specific mail as read using node-imap | node.js|node-imap | 0 | 81 | 1 | 72,911,377 | 72,911,377 | 0 | true | 2022-07-08T08:45:57.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to mark a specific mail as read using node-imap<p>I develop both the frontend and backend of a custom intern application, in which you can receive and re... |
72,915,026 | How to change text color in Mac Terminal<p>Is there a way to change the text and background color in the Mac terminal? I'm trying to change the text color to red and see if there are more backgrounds to change too.</p> | <p>Go to: Terminal>Preferences>Profiles.
(Or hit Cmd+, and click the Profiles tab)</p>
<p>From there, you can modify colour themes.</p> | How to change text color in Mac Terminal | macos|terminal | 0 | 81 | 1 | 72,915,064 | 72,915,064 | 0 | true | 2022-07-08T17:33:38.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change text color in Mac Terminal<p>Is there a way to change the text and background color in the Mac terminal? I'm trying to change the text color to... |
72,886,600 | Android is killing my app "Force finishing activity". How to debug?<p>I have the following log output</p>
<pre><code>W/ActivityTaskManager: Force finishing activity com.x.y/.MainActivity
</code></pre>
<p>and no other warnings/errors from my app itself or anything that gives me a hint in a direction for me to debug wh... | <p>I found the solution. It had nothing to do with memory management whatsoever.</p>
<p>My Testdevice just did not show the error log (I do not understand why though!). Using a different Device I finally got the error stack trace and could narrow down the mistake</p> | Android is killing my app "Force finishing activity". How to debug? | android|android-recyclerview | 0 | 81 | 1 | 72,921,540 | 72,921,540 | 0 | true | 2022-07-06T15:55:09.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android is killing my app "Force finishing activity". How to debug?<p>I have the following log output</p>
<pre><code>W/ActivityTaskManager: Force finishing... |
72,863,134 | Unity Terrain Glossy with White Patches<p>I am new to Unity and I am having difficulties applying the terrain tools. How can I fix glossy terrain with white spots within 2021.3.5f1 Unity? I'm unsure why this is happening to all of my terrain layers.</p>
<p>The textures are from the Unity Terrain Tools asset</p>
<p><a h... | <p>Convert Rendering Pipeline in Unity 2021.3.5f1's verison</p> | Unity Terrain Glossy with White Patches | unity3d|terrain|world-map|unity3d-terrain | 0 | 81 | 1 | 72,925,566 | 72,925,566 | 0 | true | 2022-07-05T01:08:42.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unity Terrain Glossy with White Patches<p>I am new to Unity and I am having difficulties applying the terrain tools. How can I fix glossy terrain with white ... |
72,946,351 | Creating new angular project using angular cli - @angular/cli and @angular/core show different versions in package.json<p>Angular beginner here. Currently held assumption - when creating a new angular project, versions of packages in package.json should match those in npmjs website.</p>
<p><code>npm list -g</code> show... | <p>They are doing slightly different things though the outcome is similar. Basically <code>ng update</code> may also check for schematics to decide if based on compatibility, it would actually bump the version - or not. <code>npm i</code> will just do it, no checks. <code>ng</code> is done with Angular CLI and <code>np... | Creating new angular project using angular cli - @angular/cli and @angular/core show different versions in package.json | angular|angular-cli|npm-install | 1 | 81 | 1 | 72,946,567 | 72,946,567 | 0 | true | 2022-07-12T02:12:17.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating new angular project using angular cli - @angular/cli and @angular/core show different versions in package.json<p>Angular beginner here. Currently he... |
72,940,058 | systemctl --user fails within a webapp or user su session<p>I have a web app that at a certain point the user can restart another web app, both running on apache-tomcat servers, both running under the same user.</p>
<p>Web app 1, let's call it <strong>manager</strong>, is used to stop and start web app 2, let's call it... | <p>After a lot of trial and error I finally found the solution:</p>
<p>I am now able to achieve my goal with:</p>
<pre><code>String[] commands = {"/bin/sh","-c","export XDG_RUNTIME_DIR=/run/user/$(id -u user)
&& systemctl --user start app-server"}
Process p = Runtime.getRuntime().... | systemctl --user fails within a webapp or user su session | java|linux|tomcat|systemctl | 0 | 81 | 1 | 72,954,922 | 72,954,922 | 0 | true | 2022-07-11T14:20:59.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
systemctl --user fails within a webapp or user su session<p>I have a web app that at a certain point the user can restart another web app, both running on ap... |
72,957,382 | Cannot create org.webrtc.voiceengine.WebRtcAudioManager on Android<p>I have a functional implementation of native (C++) WebRTC in Windows, which I'm trying to get working on every other platform now. Currently, I'm attacking Android.</p>
<p>When I call <code>webrtc::CreatePeerConnectionFactory</code>, it cannot create... | <p>Fixed! This is what I was missing:</p>
<p>I was calling <code>webrtc::JVM::Initialize</code> prior to <code>webrtc::CreatePeerConnectionFactory</code> (which is one of many Droid specific requirements they don't bother mention in any docs...). But, I missed the fact there is an overload which takes the Droid app co... | Cannot create org.webrtc.voiceengine.WebRtcAudioManager on Android | android|c++|webrtc|webrtc-android | 0 | 81 | 1 | 72,968,754 | 72,968,754 | 0 | true | 2022-07-12T19:22:02.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot create org.webrtc.voiceengine.WebRtcAudioManager on Android<p>I have a functional implementation of native (C++) WebRTC in Windows, which I'm trying t... |
72,882,690 | How can I restrict the access of certain users to "retrieve secret value" from the secret manager or to give access only to certain users<p>How can I restrict the access of certain users to "retrieve secret value" from the secret manager or to give access only to certain users? How could I do this from boto3 ... | <p>The AWS docs have a <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html" rel="nofollow noreferrer">tutorial on ABAC</a> (Attribute Based Access Control; a.k.a tagging) that describes how to do this. The tutorial is a bit of a long read though, and to sum it up, you ... | How can I restrict the access of certain users to "retrieve secret value" from the secret manager or to give access only to certain users | amazon-web-services|boto3|aws-secrets-manager | 0 | 81 | 1 | 72,975,040 | 72,975,040 | 0 | true | 2022-07-06T11:19:09.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I restrict the access of certain users to "retrieve secret value" from the secret manager or to give access only to certain users<p>How can I restric... |
72,898,234 | Extracting data lake data<p>I have a data lake path as follows:</p>
<p><code>SYSTEM/Data/Year/Month/Date/Hist/hist.parquet</code></p>
<p><code>hist.parquet</code> is present in every<code> Year/Month/Date/Hist</code> folder structure</p>
<p>I want to append all the parqets for all years as a single parquet file in <cod... | <p>I think you can load data into dataframe first and then transform it.</p>
<pre class="lang-python prettyprint-override"><code># first, create a dataframe with filepath.
from pyspark.sql.functions import input_file_name
df = spark.read.format('parquet').load('SYSTEM/Data/*/*/*/Hist/hist.parquet')
df = df.withColumn(... | Extracting data lake data | pyspark|databricks|azure-databricks|azure-data-lake | 2 | 81 | 1 | 72,977,301 | 72,977,301 | 0 | true | 2022-07-07T12:57:21.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extracting data lake data<p>I have a data lake path as follows:</p>
<p><code>SYSTEM/Data/Year/Month/Date/Hist/hist.parquet</code></p>
<p><code>hist.parquet</... |
72,977,244 | Airflow: How do I access the variables run_id, task_id, dag_id and attempt nr. in Airflow?<p>I would like to attach the log-file of an Airflow task to an e-mail that gets sent if the task failed. The log file names have the format <code>dag_id={dag_id}/run_id={run_id}/task_id={task_id}/attempt={try_number}.log</code>.
... | <p>You need to get the task_instance</p>
<pre><code> ti : TaskInstance=context['ti']
print(ti.try_number, ti.dag_id, ti.run_id, ti.task_id)
</code></pre> | Airflow: How do I access the variables run_id, task_id, dag_id and attempt nr. in Airflow? | python|logging|airflow | 0 | 81 | 1 | 72,977,386 | 72,977,386 | 0 | true | 2022-07-14T08:09:51.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Airflow: How do I access the variables run_id, task_id, dag_id and attempt nr. in Airflow?<p>I would like to attach the log-file of an Airflow task to an e-m... |
72,963,225 | Nginx, WordPress 6, Docker and friendly url<p>I need some help...
If i set up frendly url in WP, like <strong>/%postname%</strong> or <strong>/%postname%.html</strong> (docker image: wordpress:6.0-php7.4-apache) i receive 500 internal server error on blog item page (list works fine) and cant update posts from admin pan... | <p>Fix in above exsample (replace <strong>SUBFOLDER</strong> with your subpath):</p>
<p>docker-compose.yml</p>
<pre><code>wordpress:
volumes:
- wordpress_data:/var/www/html/SUBFOLDER
</code></pre>
<p>nginx.conf</p>
<pre><code> location /SUBFOLDER {
proxy_set_header Host $Host;
proxy_set_header X-Re... | Nginx, WordPress 6, Docker and friendly url | wordpress|docker|nginx|docker-compose | 0 | 81 | 2 | 72,992,631 | 72,992,631 | 0 | true | 2022-07-13T08:36:52.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nginx, WordPress 6, Docker and friendly url<p>I need some help...
If i set up frendly url in WP, like <strong>/%postname%</strong> or <strong>/%postname%.htm... |
73,000,293 | chatbot with artificial intelligence<p>I am new to programming and would like to create a chatbot(I know a little about arithmetic, statistic, linear algebra but no knowledge yet in ML/DL/AI theory. And as I'm starting, I haven't done any projects yet. But the final goal I set myself is to be able to create a chatbot w... | <p>Hey that’s an interesting project to do.</p>
<p>As you are more focused on the artificial intelligence I would stick with the biggest and most common ML language:</p>
<p>Python - this is currently the biggest Machine Learning language and allows you to use open source tensorflow for your ML models.</p>
<p>I think wh... | chatbot with artificial intelligence | artificial-intelligence|chatbot | -2 | 81 | 1 | 73,000,404 | 73,000,404 | 0 | true | 2022-07-15T22:55:03.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
chatbot with artificial intelligence<p>I am new to programming and would like to create a chatbot(I know a little about arithmetic, statistic, linear algebra... |
73,001,030 | How to update db faster using pyodbc<p>I have a simple task that it is working but it is taking way to long to finish. The task consists in retrieve data from an api (json file) and compare if that data is already on the database or not.</p>
<p>If the data is on database = update item, else =insert.</p>
<p>I do this by... | <p>Perhaps you can preprocess your <code>data_json</code> into two groups: one that needs to be inserted (does not already exist in the database) and one that needs to be updated (already exists in the database). Then you can use your <code>df.to_sql</code> call with <code>method="multi"</code> and <code>chun... | How to update db faster using pyodbc | python|sql|sql-server|pyodbc | 0 | 81 | 1 | 73,001,144 | 73,001,144 | 0 | true | 2022-07-16T01:52:33.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update db faster using pyodbc<p>I have a simple task that it is working but it is taking way to long to finish. The task consists in retrieve data fro... |
73,003,403 | 404 error when using symfony and react router<p>I am getting a 404 error when refreshing the site on routes other then "/"</p>
<p>I am using symfony and react router.</p>
<p>I have added prioity into the route but this does not seem to help</p>
<p>This is the default controller</p>
<pre><code>class DefaultCon... | <p>When you navigate in your app by clicking on links, it is handled by react router only and the urls are pushed into your address bar. When you refresh your page, it goes both through the symfony router and subsequently through the react router (if configured correctly).</p>
<p>Depending on the origin of the 404 erro... | 404 error when using symfony and react router | php|reactjs|symfony|http-status-code-404|react-router-dom | 1 | 81 | 1 | 73,010,492 | 73,010,492 | 0 | true | 2022-07-16T10:22:26.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
404 error when using symfony and react router<p>I am getting a 404 error when refreshing the site on routes other then "/"</p>
<p>I am using symfon... |
72,996,943 | Response from my chess engine using Universal Chess Interface (UCI) isn't received by the chess GUI apps<p>I've coded some toy chess engines in the past using different languages, all of them providing their own simple text-based UI. Now I want to write an engine that can be used with chess GUIs like ChessX or Cute Che... | <p>The problem seems to be in using <code>select.select()</code> and/or <code>fileinput.input()</code>. If I omit those fancy techniques and simply read from STDIN, everything works and <code>cutechess</code> accepts my engine. This is the basic code for a UCI chess engine to get recognized:</p>
<pre><code>import sys
i... | Response from my chess engine using Universal Chess Interface (UCI) isn't received by the chess GUI apps | python|chess|uci | 0 | 81 | 1 | 73,022,284 | 73,022,284 | 0 | true | 2022-07-15T16:19:33.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Response from my chess engine using Universal Chess Interface (UCI) isn't received by the chess GUI apps<p>I've coded some toy chess engines in the past usin... |
73,026,404 | Implementing animations on an array of string values<p>My goal is to try to animate text. Every example on how to animate text looks at a singular string. I'd like to animate an array of string values, one after the other.</p>
<p>The problem I'm getting is that although I'm creating the elements needed successfully, on... | <p>Instead of setInterval in a loop of the array, just create a recursive function that calls setTimeout and calls itself and increments the array counter until the end of the array.</p>
<p>The lay out of my answer is off because I'm not exactly sure on what your expected layout is</p>
<p><div class="snippet" data-lang... | Implementing animations on an array of string values | javascript|html|arrays|setinterval | 0 | 81 | 1 | 73,026,637 | 73,026,637 | 0 | true | 2022-07-18T17:37:47.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Implementing animations on an array of string values<p>My goal is to try to animate text. Every example on how to animate text looks at a singular string. I'... |
73,028,780 | Navigate between windows in WinUI 3<p>I am building a program where the main window (MainWindow) has a "Login" button. Login button takes you to LoginWindow. How do I navigate from the MainWindow to the LoginWindow on the click of a button? Or maybe activate the login window and deactivate main window? I am v... | <p>You can use the <code>ContentDialog</code> and put your LoginPage in it.</p>
<p><strong>MainWindow.xaml</strong></p>
<pre class="lang-xml prettyprint-override"><code><StackPanel x:Name="Root">
<Button
Click="LoginButton_Click"
Content="Login" />
</Stac... | Navigate between windows in WinUI 3 | c#|windows|winui-3|windows-app-sdk | 0 | 81 | 1 | 73,029,795 | 73,029,795 | 0 | true | 2022-07-18T21:21:41.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Navigate between windows in WinUI 3<p>I am building a program where the main window (MainWindow) has a "Login" button. Login button takes you to Lo... |
73,021,125 | Source Generator not functioning with XAML files in .NET 6<p>Recently migrating some .NET 472 projects to .NET 6. One of these projects is a WPF project, but for some reason, after migration, my Source Generator does not function correctly. I receive the message:</p>
<p><code>error CS0101: The namespace already contain... | <p>After some googling I found a couple of github issues with the same problem:</p>
<p><a href="https://github.com/microsoft/CsWin32/issues/601" rel="nofollow noreferrer">https://github.com/microsoft/CsWin32/issues/601</a></p>
<p>This seems to be a regression bug with the current release of .NET SDK 6.0.302, and the fi... | Source Generator not functioning with XAML files in .NET 6 | c#|.net-core|sourcegenerators | 0 | 81 | 1 | 73,033,903 | 73,033,903 | 0 | true | 2022-07-18T10:49:25.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Source Generator not functioning with XAML files in .NET 6<p>Recently migrating some .NET 472 projects to .NET 6. One of these projects is a WPF project, but... |
72,769,650 | Pyodbc can't parse query from iql file<p>I have a docker image with a script which reads an iql file and executes it in impala. Removing the file reference and running a simple script works fine (ie SELECT 1;), but whenever I try to execute the script from a file I get an error</p>
<blockquote>
<p>pyodbc.Error: ('HY000... | <p>The problem relates to the way the python code is looping through the statement and the way ';' ends the query.</p>
<p>A better way to do it for a single query in a file is</p>
<pre><code> with open('file/location.iql') as script:
statement = script.read()
print(statement)
crsr = conn.cursor()
crsr... | Pyodbc can't parse query from iql file | python|sql|pyodbc|impala | 0 | 81 | 1 | 73,049,288 | 73,049,288 | 0 | true | 2022-06-27T09:15:19.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pyodbc can't parse query from iql file<p>I have a docker image with a script which reads an iql file and executes it in impala. Removing the file reference a... |
72,917,382 | Crypto++ generating AES key to a file<p>I generate key to a file using the following function</p>
<pre><code>std::filesystem::path create_key(std::filesystem::path folder_path)
{
CryptoPP::AutoSeededRandomPool prng;
CryptoPP::byte key[CryptoPP::AES::DEFAULT_KEYLENGTH];
prng.GenerateBlock(key, sizeof(key));... | <p>This function is valid and works ,
No changes need to be added in my scenario.</p> | Crypto++ generating AES key to a file | c++|c++17|crypto++ | 0 | 81 | 1 | 73,053,491 | 73,053,491 | 0 | true | 2022-07-08T21:59:47.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Crypto++ generating AES key to a file<p>I generate key to a file using the following function</p>
<pre><code>std::filesystem::path create_key(std::filesystem... |
72,986,258 | pytest-cov showing no coverage<p>I have a python library named CorGE with the following structure</p>
<ul>
<li>CorGE
<ul>
<li>src
<ul>
<li>__init__.py</li>
<li>CorGE
<ul>
<li>__init__.py</li>
<li>collect.py</li>
<li>command.py</li>
</ul>
</li>
</ul>
</li>
<li>tests
<ul>
<li>__init__.py</li>
<li>test_collect.py</li>
</u... | <p>OK I figured out how to make this work but I am thoroughly unsatisfied with my solution. The change I made was to install <code>CorGE</code> in development mode instead of normally with <code>pip install -e .</code> and then everything started working.</p>
<p>I'm now running <code>pytest --cov .</code> from the root... | pytest-cov showing no coverage | python|pytest|pytest-cov | 1 | 81 | 1 | 73,056,759 | 73,056,759 | 0 | true | 2022-07-14T20:21:23.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pytest-cov showing no coverage<p>I have a python library named CorGE with the following structure</p>
<ul>
<li>CorGE
<ul>
<li>src
<ul>
<li>__init__.py</li>
<... |
72,333,033 | Is there a memmap functionality for pickle?<p>Is there a memmap functionality for pickle or torch.load()?</p>
<p>Ref: <a href="https://numpy.org/doc/stable/reference/generated/numpy.memmap.html" rel="nofollow noreferrer">https://numpy.org/doc/stable/reference/generated/numpy.memmap.html</a></p> | <p>My solution:</p>
<p>Using instead of pickle or <code>torch.save</code>/<code>torch.load</code>. It is better to use <code>tf.records</code>, e.g. from the PyTorch DALI plugin.</p> | Is there a memmap functionality for pickle? | python | 0 | 81 | 1 | 73,123,395 | 73,123,395 | 0 | true | 2022-05-21T20:32:22.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a memmap functionality for pickle?<p>Is there a memmap functionality for pickle or torch.load()?</p>
<p>Ref: <a href="https://numpy.org/doc/stable/r... |
72,971,614 | Checking if the 2nd list have any unique elements compared to 1st list<p>Trying my own brute force solution. Now, there is a problem with my code I don't know what the problem is. I calculated the problem on my paper perfectly and it works great. It should work as expected. But gives unexpected results.</p>
<p>Problem:... | <blockquote>
<p>When I try for: Input:</p>
<pre><code>arr[10] =[11 4 11 7 13 4 12 11 10 14]
brr[15] = [11 4 11 7 3 7 10 13 4 8 12 11 10 14 12]
</code></pre>
<p>Output gives: <code>[0, 0, 11, 0, 3, 7, 0, 0, 4, 8, 0, 11, 10, 0, 12]</code> This but I'm expecting -> <code>[0, 0, 0, 0, 3, 7, 0, 0, 0, 8, 0, 0, 10, 0, 12]<... | Checking if the 2nd list have any unique elements compared to 1st list | java|sorting|implementation|brute-force | 0 | 81 | 2 | 72,972,067 | 72,972,067 | 0 | true | 2022-07-13T19:26:31.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Checking if the 2nd list have any unique elements compared to 1st list<p>Trying my own brute force solution. Now, there is a problem with my code I don't kno... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.