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,935,249 | How to get only the number of all files on a drive?<p>I want to get only the number of files on my hard disk drive.</p>
<p>I tried:</p>
<pre><code>DIR /S C:\
</code></pre>
<p>But it lists nearly forever all the files recursively and at the end I get what I want: the number of files.</p>
<p>How do I get only the number ... | <p>List files in bare format and pipe to <code>find</code>, which simply counts all lines:</p>
<pre><code>dir /s /b /A-D-L c:\* | find /c /v ""
</code></pre>
<p>lists all files (including hidden and system files) without folders. You can adapt which files to include/exclude. See <code>dir /?</code> for detail... | How to get only the number of all files on a drive? | windows|batch-file | 0 | 47 | 1 | 72,935,474 | 72,935,474 | 0 | true | 2022-07-11T07:48:10.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get only the number of all files on a drive?<p>I want to get only the number of files on my hard disk drive.</p>
<p>I tried:</p>
<pre><code>DIR /S C:\... |
72,971,188 | Why main loop stops at last iteration<p>my program should accept input from:<br>
3<br>
UUUDU<br>
DDD<br>
UU<br></p>
<p>the output should be<br>
3<br>0<br>2<br></p>
<p>but it stops at 0<br></p>
<pre><code>int t;
cin >> t;
for(int i=0;i<t;i++){
string s;
vector<int> n;
int m;
cin>>s;
... | <p>You mustn't read <code>n[0]</code> when <code>n</code> has no elements.</p>
<p>To avoid the error, the part</p>
<pre class="lang-cpp prettyprint-override"><code>if(n.size()>0){
sort(n.begin(),n.end());
}
cout<<n[0]<<endl;
</code></pre>
<p>should be</p>
<pre class="lang-cpp prettyprint-override"><c... | Why main loop stops at last iteration | c++ | -3 | 47 | 1 | 72,971,223 | 72,971,223 | 0 | true | 2022-07-13T18:45:26.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why main loop stops at last iteration<p>my program should accept input from:<br>
3<br>
UUUDU<br>
DDD<br>
UU<br></p>
<p>the output should be<br>
3<br>0<br>2<b... |
72,942,772 | Can we render InputStream from Spring Boot Backend on React Frontend?<p>I have a virtual file system in my java spring boot backend that converts any file into an InputStream, I am sending this InputStream using REST to my React frontend. Is there anyway I can accordingly render this InputStream on the frontend?</p>
<p... | <p>Sure. I've an example using <a href="https://www.npmjs.com/package/axios" rel="nofollow noreferrer">axios</a>.</p>
<pre><code> const readFile = async (filename: string) => {
try {
// fetch your file
const response = await axios.get(`/api/file/${filename}`, {
responseType: "arraybuffe... | Can we render InputStream from Spring Boot Backend on React Frontend? | reactjs|spring-boot|api|rest|inputstream | 0 | 47 | 1 | 72,942,936 | 72,942,936 | 0 | true | 2022-07-11T17:56:50.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can we render InputStream from Spring Boot Backend on React Frontend?<p>I have a virtual file system in my java spring boot backend that converts any file in... |
72,793,226 | Why doesn't this function change the case of the string when it has a similar character like the first letter?<p>Can't understand why the following function works for some strings an didn't work for some which has a similar character like the first.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-cons... | <p>The function <code>String.prototype.replace</code> replaces the first occurrence when the first argument is a string.</p>
<p>You can split the string change the index to uppercase and finally join the chars.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div cla... | Why doesn't this function change the case of the string when it has a similar character like the first letter? | javascript|arrays|string|replace | 0 | 47 | 4 | 72,793,323 | 72,793,323 | 0 | true | 2022-06-28T21:15:39.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why doesn't this function change the case of the string when it has a similar character like the first letter?<p>Can't understand why the following function ... |
72,847,699 | How to change value of child table after form submit?<p>I'm making a web app in Oracle Apex for a harbor (for my final project). I don't know how to handle a situation. So I made a calendar and I have 2 tables: 1) <code>VEZ</code> table that has <code>ID_VEZ</code>(number), <code>VEZ_NUMBER</code>(number), <code>VEZ_MA... | <p>As of <strong>1</strong>: create a page process which updates vez status:</p>
<pre><code>update vez v set
v.vez_status = 'TAKEN'
where v.id_vez = :P1_ID_VEZ_FK;
</code></pre>
<p>As of <strong>2</strong>: create list of values that displays only free vez numbers:</p>
<pre><code>select v.vez_number as display_valu... | How to change value of child table after form submit? | sql|oracle|plsql|oracle-apex | 0 | 47 | 1 | 72,849,008 | 72,849,008 | 0 | true | 2022-07-03T15:22:37.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change value of child table after form submit?<p>I'm making a web app in Oracle Apex for a harbor (for my final project). I don't know how to handle a... |
72,873,138 | Gitea in Docker Swarm doesn't run in global mode<p>I have a custom image of Gitea placed in a Docker Swarm, the implementation of the service is realized via Docker Compose. The issue is that, although I have specified that it has to run in global mode, it says global but I only have 1/1 replicas, that is wrong because... | <p>I solved the problem by building and pushing from both nodes with the new images into the registry.
Now it works in global mode with 2/2 replicas.</p> | Gitea in Docker Swarm doesn't run in global mode | docker|docker-compose|docker-swarm|docker-registry|gitea | 0 | 47 | 1 | 72,881,656 | 72,881,656 | 0 | true | 2022-07-05T17:03:32.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Gitea in Docker Swarm doesn't run in global mode<p>I have a custom image of Gitea placed in a Docker Swarm, the implementation of the service is realized via... |
72,944,135 | Is there a way to tell which set a list item came from?<p>I currently have this working to where it outputs any changes made to the sitemap.</p>
<p>What I want is for it to show if the change was removed or added. I figured I could do this by somehow finding out which list the output came from.</p>
<p>i.e
If was the ol... | <p>You can't tell which set a value came from when you use <code>oldPage ^ newPage</code>. Use subtraction to get each difference.</p>
<pre><code>added = newPage - oldPage
deleted = oldPage - newPage
</code></pre>
<p>Then when you're writing these to the CSV file, you can add a label to each row indicating which set it... | Is there a way to tell which set a list item came from? | python | -1 | 47 | 1 | 72,944,226 | 72,944,226 | 0 | true | 2022-07-11T20:10:35.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to tell which set a list item came from?<p>I currently have this working to where it outputs any changes made to the sitemap.</p>
<p>What I wa... |
72,959,305 | Efficient way to create a new list based of the differences in values in 2 dictionaries?<p>I currently have 2 strings that are formatted as an XML that are later converted into dictionaries for comparison.</p>
<p>So, I have a 2 Dictionary<string, object>, dict1 and dict2, that I need to compare. I need to:</p>
<o... | <p>I don't claim that this is any faster, but it should be on par and it's less code:</p>
<pre><code>List<string> list =
dict2
.Keys
.Where(k => !(dict1.ContainsKey(k) && dict1[k].Equals(dict2[k])))
.ToList();
</code></pre>
<p>I did do some testing with this:</p>
<pre><code>... | Efficient way to create a new list based of the differences in values in 2 dictionaries? | c#|performance|dictionary | 1 | 47 | 2 | 72,959,549 | 72,959,549 | 0 | true | 2022-07-12T23:19:47.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Efficient way to create a new list based of the differences in values in 2 dictionaries?<p>I currently have 2 strings that are formatted as an XML that are l... |
72,933,414 | Sidekiq - Send job to Deadset directly without retrying<p>How to send a job to the Deadset?</p>
<p>I've been searching around and I see some other developers that want to Notify to their exception handling systems when a job fails, for example if the job connects to an unreliable third party API.</p>
<p>In my case I wo... | <p>I ended up injecting directly in the Deadset the record by just using the params of my original job. I captured the exception (using a custom exception) and the <code>rescue_from</code> method.</p>
<pre class="lang-rb prettyprint-override"><code>class MyJob < ActiveJob::Base
rescue_from(CustomException) do |ex... | Sidekiq - Send job to Deadset directly without retrying | ruby-on-rails|ruby|sidekiq | 0 | 47 | 2 | 72,987,270 | 72,987,270 | 0 | true | 2022-07-11T03:30:38.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sidekiq - Send job to Deadset directly without retrying<p>How to send a job to the Deadset?</p>
<p>I've been searching around and I see some other developers... |
72,950,427 | New to Python, need help where to put .lower() into my code<p>I am unsure where to put ".lower()" into my code below so the user can enter any of the three options without being case-sensitive. For example, they can enter NEW york and it wouldn't give an error because it's not spelled exactly as listed in the... | <p>You just need to use the <code>lower()</code> method on a string like this <code>city.lower()</code>. Although you'll get a further problem because your string will be lower case and your cities are title case which would need <code>city.title()</code> to match.</p>
<p>As long as you are consistent with your approa... | New to Python, need help where to put .lower() into my code | python | -4 | 47 | 1 | 72,950,717 | 72,950,717 | 0 | true | 2022-07-12T09:57:22.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
New to Python, need help where to put .lower() into my code<p>I am unsure where to put ".lower()" into my code below so the user can enter any of t... |
72,923,301 | Force camera to be parallel to ground<p>I want my fly camera to always be parallel to the ground.
In other words I strictly want my camera's right vector to be always (1,0,0).</p>
<p>I created a custom Camera Controller in three.js to simulate some custom camera movements and pointerlock behaviour.</p>
<p>Here, is the ... | <p>WestLangley comment solved my problem.</p>
<p>Ref: <a href="https://stackoverflow.com/a/67856474/10638802">https://stackoverflow.com/a/67856474/10638802</a></p>
<p>Posting a fresh answer for future viewers.</p>
<pre><code>this.upVector: THREE.Vector3 = new THREE.Vector3(0.0, 1.0, 0.0);
this.camera: THREE.Perspective... | Force camera to be parallel to ground | javascript|three.js|3d|rendering|quaternions | 0 | 47 | 1 | 72,924,113 | 72,924,113 | 0 | true | 2022-07-09T17:10:20.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Force camera to be parallel to ground<p>I want my fly camera to always be parallel to the ground.
In other words I strictly want my camera's right vector to ... |
72,982,818 | Select a block of text via VS Code API<p>How can I select/highlight a block of text by two different <code>vscode.Position</code>s via <strong>VS Code API</strong>?</p>
<p><a href="https://i.stack.imgur.com/BmJaA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BmJaA.png" alt="enter image description ... | <p>First, you need to create the two <a href="https://code.visualstudio.com/api/references/vscode-api#Position" rel="nofollow noreferrer">Position</a> objects:</p>
<pre class="lang-js prettyprint-override"><code>const pos1 = new vscode.Position(line1, col1);
const pos2 = new vscode.Position(line2, col2);
</code></pre>
... | Select a block of text via VS Code API | javascript|visual-studio-code|vscode-extensions | 1 | 47 | 1 | 72,995,414 | 72,995,414 | 0 | true | 2022-07-14T15:11:59.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Select a block of text via VS Code API<p>How can I select/highlight a block of text by two different <code>vscode.Position</code>s via <strong>VS Code API</s... |
72,890,976 | Cannot select List as a data source in C# visual studio designer<p>I have a WinForm with a Listbox, and a class which contains a List I want to use for a data source.</p>
<p>DataSource property for the Listbox wont give me the option for the List I want to use. I know I cannot add this list to the DataSource through de... | <p>As Chetan's comment suggests,the solution is to add the code into the "form_load":</p>
<pre><code>private void Form1_Load(object sender, EventArgs e)
{
this.listbox1.DataSource = Namespace1.MyWinform.MyList.ToArray();
}
</code></pre> | Cannot select List as a data source in C# visual studio designer | c#|visual-studio|windows-forms-designer | 0 | 47 | 1 | 72,891,603 | 72,891,603 | 0 | true | 2022-07-06T23:55:42.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot select List as a data source in C# visual studio designer<p>I have a WinForm with a Listbox, and a class which contains a List I want to use for a dat... |
72,794,356 | pytorch.info summary for Generator of AN equivalent to discriminator or summary for whole GAN<p>Is it possible to generate a summary for the generator network of a GAN equivalent to the summary for the discriminator network using pytorch.info (containing inputs and outputs) or is there even a standard summary for the w... | <p>This package is not recommended for debugging your code, you should therefore always make sure your code runs on random data before testing the summary.</p>
<p>In the second group of commands, you are using <code>output_size</code> instead of <code>input_size</code> (cf. <a href="https://github.com/TylerYep/torchinf... | pytorch.info summary for Generator of AN equivalent to discriminator or summary for whole GAN | pytorch|summary|generative-adversarial-network | 0 | 47 | 1 | 72,797,327 | 72,797,327 | 0 | true | 2022-06-28T23:59:11.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pytorch.info summary for Generator of AN equivalent to discriminator or summary for whole GAN<p>Is it possible to generate a summary for the generator networ... |
72,870,592 | For loop on Django Template<p>I'm having a huge issue on making for loop on django templates,for some reasone it dont show on the page the categories that i create on database</p>
<p>urls.py</p>
<pre><code>app_name = 'statenews'
urlpatterns = [
path('', views.home, name="home"),
path('', views.category, name ... | <p>You have two url paths with same url. Change it to:</p>
<pre><code>urlpatterns = [
path('', views.home, name="home"),
path('categories', views.category, name = 'category')
]
</code></pre>
<p>Then enter via <code>yourdomain.com/categories</code>. Otherwise it will always show <code>home</code> view.... | For loop on Django Template | python|django | -3 | 47 | 1 | 72,871,409 | 72,871,409 | 0 | true | 2022-07-05T13:50:46.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
For loop on Django Template<p>I'm having a huge issue on making for loop on django templates,for some reasone it dont show on the page the categories that i ... |
73,016,192 | I want to make a function if the common key is found in both dataframes<p>I have two dataframes df1 and df2 each of them have column containing product code and product price, I wanted to check the difference between prices in the 2 dataframes and store the result of this function I created in a new dataframe "df3... | <h1>Why you got the error message "<code>The truth value of a Series is ambiguous</code>"</h1>
<p>You got the error message <code>The truth value of a Series is ambiguous</code>
because you tried input a <code>pandas.Series</code> into an <code>if</code>-clause</p>
<pre class="lang-python prettyprint-override... | I want to make a function if the common key is found in both dataframes | python|pandas|dataframe|for-loop | 0 | 47 | 2 | 73,030,196 | 73,030,196 | 0 | true | 2022-07-18T00:06:42.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to make a function if the common key is found in both dataframes<p>I have two dataframes df1 and df2 each of them have column containing product code ... |
72,885,802 | How to add inline Javascript if condition to dropdown value?<p>How can I add an <code>if</code> condition within the code so that I can enable/disable the select based on boolean flag?</p>
<p>I have defined boolean property named <code>isEnable</code>. Based on this value I want to enable/disable the dropdown value <... | <p>To do what you require you can use a ternary expression to concatenate the <code>disabled</code> attribute to the <code>select</code> HTML if <code>isEnable</code> is false. This can be made simpler still by using a template literal:</p>
<pre class="lang-js prettyprint-override"><code>"columns": [{
&qu... | How to add inline Javascript if condition to dropdown value? | javascript|html|jquery|drop-down-menu|boolean | 1 | 47 | 1 | 72,885,872 | 72,885,872 | 0 | true | 2022-07-06T14:59:07.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add inline Javascript if condition to dropdown value?<p>How can I add an <code>if</code> condition within the code so that I can enable/disable the s... |
72,906,949 | Power Automate: Take one email with two attachments and save each attachment into a different folder<p>I used to get an email with <em>one</em> attachment and save it to a sharepoint/onedrive folder through Power Automate. The condition was that it had an attachment, then part of the subject and the sender email addres... | <p>Had to have the condition in a "apply to each attachment in email" (apply to each) step, and then just wait for the actual email I am setting this up for to arrive. My testing failed due to my own email being digitally signed / encrypted, which Power Automate cannot handle..</p> | Power Automate: Take one email with two attachments and save each attachment into a different folder | sharepoint|outlook|onedrive|power-automate | 0 | 47 | 1 | 73,124,079 | 73,124,079 | 0 | true | 2022-07-08T05:17:31.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Power Automate: Take one email with two attachments and save each attachment into a different folder<p>I used to get an email with <em>one</em> attachment an... |
72,913,959 | 'ListingGenerator' object has no attribute 'top' python praw<p>I would like to filter the posts on (weekly top posts) time but my computer says the 'ListingGenerator' object has no attribute 'top'. What am I doing wrong?</p>
<pre><code>import praw
reddit = praw.Reddit(
client_id = "",
client_secret = "&... | <p>I believe you can use the filters of <code>time_filter</code> and <code>limit</code> together as shown below, I have tested it and it works.</p>
<pre><code>
import praw
reddit = praw.Reddit(
client_id="enter your client id here",
client_secret="enter your client secret here",
user_ag... | 'ListingGenerator' object has no attribute 'top' python praw | python|reddit|praw | 0 | 47 | 2 | 72,914,279 | 72,914,279 | 0 | true | 2022-07-08T15:50:25.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
'ListingGenerator' object has no attribute 'top' python praw<p>I would like to filter the posts on (weekly top posts) time but my computer says the 'ListingG... |
72,956,461 | Formatting hstore column Postgres<p>I'm trying to find the best way to format a hstore column (see screenshot) my goal is to have the same format based on the screenshot as the "updated_column. I was thinking about a case statement like :</p>
<p>Case when json_column -> id then 'id:'</p>
<p>any suggestion would... | <p>So I think i found a temporary solution that will work, but I think like @Bergi mentioned a view might be more appropriate.</p>
<p>For now I will just use something like:</p>
<pre><code> concat(concat(concat(concat('id',':',column -> 'id')
,' ','auth_id',':',column -> 'auth_id')
,' ','type',':',colum... | Formatting hstore column Postgres | postgresql|hstore | 0 | 47 | 3 | 72,958,361 | 72,958,361 | 0 | true | 2022-07-12T17:49:05.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Formatting hstore column Postgres<p>I'm trying to find the best way to format a hstore column (see screenshot) my goal is to have the same format based on th... |
72,769,244 | How to allow access to a folder in AWS s3 and deny access to all other folder?<p>I want to allow access to a folder with certain file extension. I have this policy created:</p>
<pre class="lang-json prettyprint-override"><code>{
"Version": "2012-10-17",
"Id": "Policy1464968545... | <p>Remove deny policy (that you named "allow-policy-2"). On default there is no access granted to any object so I don't see the point of adding deny policy and it looks like it overrides allow policy that you have created as first in the statement ("allow-policy-1")</p> | How to allow access to a folder in AWS s3 and deny access to all other folder? | amazon-web-services|amazon-s3|amazon-iam | 0 | 47 | 1 | 72,770,774 | 72,770,774 | 1 | true | 2022-06-27T08:41:18.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to allow access to a folder in AWS s3 and deny access to all other folder?<p>I want to allow access to a folder with certain file extension. I have this ... |
72,776,038 | Find nested div/class with Beautiful Soup<p>I'm looking at this URL: <a href="https://www.zillow.com/homedetails/2616-Tinmouth-St-Austin-TX-78748/64743359_zpid/" rel="nofollow noreferrer">https://www.zillow.com/homedetails/2616-Tinmouth-St-Austin-TX-78748/64743359_zpid/</a></p>
<p>My goal is to just pull the damn zesti... | <p>The website is dynamic. Your element selection selects nothing but that's not the big reason too. The main reason behind to get data is that data is in json format under html DOM with comment.</p>
<pre><code>import requests
import re
import json
url='https://www.zillow.com/homes/for_sale/2_p/?searchQueryState=%7B%22... | Find nested div/class with Beautiful Soup | python|html|pandas|beautifulsoup | 1 | 47 | 1 | 72,776,209 | 72,776,209 | 1 | true | 2022-06-27T17:17:59.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find nested div/class with Beautiful Soup<p>I'm looking at this URL: <a href="https://www.zillow.com/homedetails/2616-Tinmouth-St-Austin-TX-78748/64743359_zp... |
72,778,033 | Pandas merge_asof Question: one-to-multiple merge<p>I am trying to merge two dataframes by nearest time point.
I tried <code>merge_asof</code>. However, the issue is two entries have the same time point, then
<code>merge_asof</code> will only merge one entry into the final dataframe.</p>
<p>Here is an example:</p>
<p>d... | <p>You need to perform a double <code>merge</code>, first with the <code>merge_asof</code>, then a classical <code>merge</code>. The trick is to identify the duplicates in the asof merged right DataFrame:</p>
<pre><code>df_B2 = df_B.assign(idx=df_B.groupby('time').ngroup())
out = (pd
.merge_asof(df_A, df_B2, on='time... | Pandas merge_asof Question: one-to-multiple merge | python|pandas|dataframe|merge | 1 | 47 | 1 | 72,778,372 | 72,778,372 | 1 | true | 2022-06-27T20:38:21.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas merge_asof Question: one-to-multiple merge<p>I am trying to merge two dataframes by nearest time point.
I tried <code>merge_asof</code>. However, the ... |
72,781,007 | Groovy Script and C# Integration<p>We have a console application running in C#, and we need to integrate a groovy script with that. Is there a way to do that? Of course I google it before coming here, and the only useful result I got, it was this one here below:</p>
<p><a href="https://jnbridge.com/blog/groovy-to-net-i... | <p>take a look at IKVM.NET I do think this is what you are wanting, "IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. IKVM is free software, distributed under a permissive free software license." this allows usage of java to C# bridge and vice versa.</p> | Groovy Script and C# Integration | c#|groovy|integration | 0 | 47 | 1 | 72,781,130 | 72,781,130 | 1 | true | 2022-06-28T05:10:53.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Groovy Script and C# Integration<p>We have a console application running in C#, and we need to integrate a groovy script with that. Is there a way to do that... |
72,782,660 | Converting Currency Symbol to Currency Code: SQL<p>I have two separate data sources which has a column currency,</p>
<p>One has <code>Currency</code> present as <code>USD</code>
Another One has <code>$</code> present as data.</p>
<p>Is there a way to convert the symbol to USD ?</p>
<p>Also what if we have <code>multipl... | <p>Create a lookup table:</p>
<pre class="lang-sql prettyprint-override"><code>CREATE TABLE currencies (
country_code VARCHAR2(3),
currency_code VARCHAR2(3),
name VARCHAR2(50),
symbol VARCHAR2(5)
);
INSERT INTO currencies (country_code, currency_code, name, symbol)
SELECT 'USA', 'USD', 'US Do... | Converting Currency Symbol to Currency Code: SQL | sql|oracle | 0 | 47 | 2 | 72,782,995 | 72,782,995 | 1 | true | 2022-06-28T07:54:47.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converting Currency Symbol to Currency Code: SQL<p>I have two separate data sources which has a column currency,</p>
<p>One has <code>Currency</code> present... |
72,781,225 | How can i add thumbnails to search results in the Add Product modal (Woocommerce Admin)?<p><a href="https://i.stack.imgur.com/ZCD0s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZCD0s.png" alt="enter image description here" /></a></p>
<p>I'm trying to update the functionality of the search in the A... | <p>You can use the following snippet, but you'd need to add some styling</p>
<pre><code>add_filter('woocommerce_json_search_found_products', 'test_function_products_image');
function test_function_products_image($products){
foreach($products as $key => $name){
$product = wc_get_product($key);
$s... | How can i add thumbnails to search results in the Add Product modal (Woocommerce Admin)? | javascript|php|wordpress|woocommerce|modal-dialog | 1 | 47 | 1 | 72,785,612 | 72,785,612 | 1 | true | 2022-06-28T05:38:51.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i add thumbnails to search results in the Add Product modal (Woocommerce Admin)?<p><a href="https://i.stack.imgur.com/ZCD0s.png" rel="nofollow norefe... |
72,787,319 | Why when I define the variable I defined in the for loop as global, it only writes once on the serial monitor?<p>as you can see below, I have defined the variable that I need to define in the for loop global, and this time the for loop only worked once, even though it was inside the void loop. Could you tell me why?</p... | <p>Since <code>i</code> is a global variable, it's value persists through each call to <code>loop()</code>.</p>
<p>First time <code>loop()</code> is called:</p>
<pre><code>void loop() {
// i == 'A', it's initial value
for ( ; i <= 'Z'; i++)
Serial.print(i);
// Now, i == '[' because of i++ in the ... | Why when I define the variable I defined in the for loop as global, it only writes once on the serial monitor? | c++|arduino | 1 | 47 | 1 | 72,788,123 | 72,788,123 | 1 | true | 2022-06-28T13:28:51.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why when I define the variable I defined in the for loop as global, it only writes once on the serial monitor?<p>as you can see below, I have defined the var... |
72,788,699 | Change values of dataframe based on values of groupby<p>I have a dataframe generated from the following code:</p>
<pre><code>vote_mode = dataset.groupby(['ini_num','dep_parl_group'])['vote'].agg(lambda x: disambiguated_mode(x)).to_frame()
</code></pre>
<p>This gives me the a three-column dataframe (ini_num, dep_parl_gr... | <p>Try this, here I substituted for disambiguated_mode:</p>
<pre><code>dataset['vote_1'] = (dataset.groupby(['ini_num','dep_parl_group'])['vote']
.transform(lambda x: x.mode()[0]))
</code></pre>
<p>Output:</p>
<pre><code> ini_num dep_parl_group vote what I want vote_1... | Change values of dataframe based on values of groupby | python|pandas | 1 | 47 | 2 | 72,789,594 | 72,789,594 | 1 | true | 2022-06-28T14:52:06.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change values of dataframe based on values of groupby<p>I have a dataframe generated from the following code:</p>
<pre><code>vote_mode = dataset.groupby(['in... |
72,772,383 | How to create a common area between elements in d3.js?<p>Who knows how to create a common area between elements in d3.js as pictured?</p>
<p>I know there is a plugin like <em><strong>d3-sankey</strong></em>, but it doesn't really work for me.</p>
<p>Thanks for help!!!</p>
<p><a href="https://i.stack.imgur.com/1FLoU.png... | <p>Best solution for my problem it`s <em><strong>d3.polygonHull</strong></em></p>
<p>Thank you all for your help, especially @Robin Mackenzie</p> | How to create a common area between elements in d3.js? | javascript|typescript|svg|d3.js | 0 | 47 | 1 | 72,789,614 | 72,789,614 | 1 | true | 2022-06-27T12:48:50.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a common area between elements in d3.js?<p>Who knows how to create a common area between elements in d3.js as pictured?</p>
<p>I know there is ... |
72,790,906 | Flink Disable Savepoint for specific state<p>I manage 2 different states in one flink job. But i dont need to take savepoint for one of them. For other, i have to take savepoint.</p>
<p>I dont want to take savepoint for the one which is not necessary because it is going to increase savepoint duration and size.</p>
<p>I... | <p>Any state that Flink is managing will be included in all savepoints and checkpoints. Both types of state snapshots use the same underlying mechanism, and include all state.</p> | Flink Disable Savepoint for specific state | apache-flink|flink-streaming | 0 | 47 | 1 | 72,792,240 | 72,792,240 | 1 | true | 2022-06-28T17:35:29.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flink Disable Savepoint for specific state<p>I manage 2 different states in one flink job. But i dont need to take savepoint for one of them. For other, i ha... |
72,988,098 | Keyring stops working after first get_password() call when running Flask project with gunicorn in supervisor<p>I'm trying to run a instance of a flask project with gunicorn on supervisor and I'm facing a issue where I'm not able to retrieve passwords from keyring after the first <code>get_password()</code> is called. A... | <p>Here's a brief explanation of what I found out:</p>
<p><a href="https://github.com/jaraco/keyring/blob/ba4ce89049c400670a71d38f630cf56605398394/keyring/util/platform_.py#L25" rel="nofollow noreferrer">Keyring uses Pathlib to find the current .local/share folder in home environment</a> and <a href="https://github.com... | Keyring stops working after first get_password() call when running Flask project with gunicorn in supervisor | python|flask|gunicorn|python-keyring | 2 | 47 | 1 | 73,256,497 | 73,256,497 | 0 | true | 2022-07-15T01:11:30.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Keyring stops working after first get_password() call when running Flask project with gunicorn in supervisor<p>I'm trying to run a instance of a flask projec... |
72,829,255 | Is circuit composed of NAND/NOR turing complete?<p>According to another answer, it seems yes, but it looks like any binary counter implementation uses some kind of "clock".</p>
<p>So, is NAND/NOR still turing complete without "clock" component?</p> | <p>For an overview of the topic, <a href="https://stackoverflow.com/q/7284/1911064">this related post</a> is helpful.</p>
<p>A <a href="https://en.wikipedia.org/wiki/Combinational_logic" rel="nofollow noreferrer">combinational logic</a> circuit composed of <code>NAND</code> and <code>NOR</code> gates without feedback l... | Is circuit composed of NAND/NOR turing complete? | logic | 0 | 47 | 1 | 73,422,713 | 73,422,713 | 0 | true | 2022-07-01T12:26:42.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is circuit composed of NAND/NOR turing complete?<p>According to another answer, it seems yes, but it looks like any binary counter implementation uses some k... |
72,957,853 | How do I Modify a Local Notifications TItle Before Showing Notification for iOS Xamarin.Forms?<p>I am using the MS example for showing a local notification. I am scheduling a daily repeating notification and need to modify the title and message each day based on an API call. I tried modifying the title & message th... | <p>Modifying the data shown in a notification for iOS is impossible after the notification has been set. There is no callback method that can be used in iOS like on Android when a notification is shown.</p>
<p>To set the daily notification on repeat with different message the best course of action is to use push notifi... | How do I Modify a Local Notifications TItle Before Showing Notification for iOS Xamarin.Forms? | xamarin.forms|xamarin.ios|uilocalnotification | 0 | 47 | 1 | 73,436,748 | 73,436,748 | 0 | true | 2022-07-12T20:07:53.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I Modify a Local Notifications TItle Before Showing Notification for iOS Xamarin.Forms?<p>I am using the MS example for showing a local notification. ... |
72,260,525 | Appending value<p>I know this question may have already been asked, but I'm not finding it, what I'd like to know is how I can use numpy to insert values just like I use append for lists (determining a position) without losing formatting (dimensions), and if possible I would like to know how to insert a value in any ... | <p>There is no simple function or solution that fulfills what was asked</p> | Appending value | python|arrays|list|numpy | 0 | 47 | 1 | 73,480,696 | 73,480,696 | 0 | true | 2022-05-16T14:05:54.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Appending value<p>I know this question may have already been asked, but I'm not finding it, what I'd like to know is how I can use numpy to insert values j... |
72,989,072 | Couldn't find a template file or inline render method for sub-component<p>Getting this error:</p>
<pre><code>ViewComponent::TemplateError in Welcome#show
Couldn't find a template file or inline render method for FaqComponent::QuestionComponent.
</code></pre>
<p>Kind of stuck forever with this issue, not sure how to res... | <p>Have to define a template or <code>call method</code> for the <code>QuestionComponent</code> nested in the <code>FaqComponent</code>, that's the source of your errors.</p>
<p>That's why it fails at <code><%= q %></code>, which is trying to render the <code>QuestionComponent</code>. If you add a <code>app/compo... | Couldn't find a template file or inline render method for sub-component | ruby-on-rails|view-components | 0 | 47 | 2 | 73,616,751 | 73,616,751 | 0 | true | 2022-07-15T04:32:11.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Couldn't find a template file or inline render method for sub-component<p>Getting this error:</p>
<pre><code>ViewComponent::TemplateError in Welcome#show
Cou... |
72,342,752 | In what scenarios would CLLocationManager return a current location array with more than one entry?<h2>Background</h2>
<p><a href="https://developer.apple.com/documentation/corelocation/cllocationmanagerdelegate/1423615-locationmanager" rel="nofollow noreferrer">According to the documentation for the delegate method <c... | <ol>
<li><p>Does this occur when someone has approximate location but not
precise location enabled?</p>
<blockquote>
<p>No</p>
</blockquote>
</li>
<li><p>Does this occur when the user is switching between our app and another app very quickly?</p>
<blockquote>
<p>No</p>
</blockquote>
</li>
<li><p>Does this occur when GP... | In what scenarios would CLLocationManager return a current location array with more than one entry? | ios|swift|location|cllocationmanager | 0 | 47 | 1 | 73,629,077 | 73,629,077 | 1 | true | 2022-05-23T02:41:06.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In what scenarios would CLLocationManager return a current location array with more than one entry?<h2>Background</h2>
<p><a href="https://developer.apple.co... |
72,246,461 | Python give me a Value error too many values to unpack (expected 2)<p>I have a problem with an error and I can not handle it. I want to download music from youtube and automatically extract descriptions to capitols on youtube. I do not know why I scraped a Web and Stakowerflow too but I can solute it
The expectation is... | <p>The convert() function returns a 3-tuple but the calling code only wants 2 values. If the <em>hours</em> value is not wanted then:</p>
<pre><code>_, mins, seconds = convert(lenght)
</code></pre>
<p><strong>Note:</strong></p>
<p>No attempt made to correct OP's spelling error</p> | Python give me a Value error too many values to unpack (expected 2) | python | 0 | 47 | 1 | 72,246,841 | 72,246,841 | 0 | true | 2022-05-15T07:52:51.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python give me a Value error too many values to unpack (expected 2)<p>I have a problem with an error and I can not handle it. I want to download music from y... |
72,250,796 | Math.round method turns thousands into hundreds<p>I'm trying to create a map-related calculator and I'm having a problem with the Math.Round method. Basically, I want the program to take the real-life length and the length on a map to calculate the scale of said map. After it calculates the scale it should round it fro... | <p>So with the added culture info and <code>RealLengthincm = RealLength * 100;</code> this should be working.</p>
<pre><code>using System.Globalization;
double RealLength;
string RealLengthString;
double MapLength;
string MapLengthString;
double RealLengthincm;
double Scalenoteven;
int Scaleeven;
Console.WriteLine(&q... | Math.round method turns thousands into hundreds | c#|rounding|math.round | 0 | 47 | 1 | 72,251,143 | 72,251,143 | 0 | true | 2022-05-15T17:49:14.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Math.round method turns thousands into hundreds<p>I'm trying to create a map-related calculator and I'm having a problem with the Math.Round method. Basicall... |
72,249,949 | Ruby net/ssh is not running bash commands in background<p>I am having a hard time running bash commands in background from a Ruby script.</p>
<p>For this question, I am using a simplified example.</p>
<p>This is how commands are working as expected when I run them from PuTTY.</p>
<p><a href="https://i.stack.imgur.com/F... | <p>You need to redirect both stdout and stderr somewhere else than the terminal, otherwise <code>exec!</code> will hang waiting for process output.</p>
<p>This is the simplest solution I found:</p>
<pre><code>ssh.exec!("sleep 600 &> /dev/null &")
</code></pre>
<p><code>&></code> redirects bo... | Ruby net/ssh is not running bash commands in background | ruby|bash|ssh|net-ssh | 0 | 47 | 1 | 72,251,335 | 72,251,335 | 0 | true | 2022-05-15T16:02:21.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ruby net/ssh is not running bash commands in background<p>I am having a hard time running bash commands in background from a Ruby script.</p>
<p>For this que... |
72,257,156 | Using BeautifulSoup to get text and image urls from HTML string<pre><code>class BlogApi(object):
def __init__(self):
json = "https://remaster.realmofthemadgod.com/index.php?rest_route=/wp/v2/posts/"
with urllib.request.urlopen(f"{rotmgjson}") as url:
self.post_json = json.loads(url.r... | <p>You could go ahead and replace the <code><img src=my_image.png/></code> element with the the <code>src</code> text, like</p>
<pre><code>for image in (images := soup.find_all('img', {'src':re.compile('.png')})):
image.replace_with(image.get('src'))
</code></pre>
<p>This will leave you with only the text whe... | Using BeautifulSoup to get text and image urls from HTML string | python|html|string|beautifulsoup | 1 | 47 | 1 | 72,259,611 | 72,259,611 | 0 | true | 2022-05-16T09:42:48.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using BeautifulSoup to get text and image urls from HTML string<pre><code>class BlogApi(object):
def __init__(self):
json = "https://remaster.realmo... |
72,262,349 | React Native : nested JSON object shallow copy (reference) not working<p>I have a nested JSON objects that looks like <code>{"name", "children": [JSON objects]}</code>.
I am trying to add a new child to the object found with a variable <code>path</code>, an array of names.</p>
<p>My code doesn't wor... | <p>Okay after checking, indeed <code>[Array]</code> is not the empty array, and the code works as intended. It seems React Native only display array up to one depth.</p> | React Native : nested JSON object shallow copy (reference) not working | javascript|json|react-native|reference|shallow-copy | 0 | 47 | 1 | 72,263,612 | 72,263,612 | 0 | true | 2022-05-16T16:14:18.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Native : nested JSON object shallow copy (reference) not working<p>I have a nested JSON objects that looks like <code>{"name", "children... |
72,262,852 | search function for finding books in a datastructure<p>I want to implement a search filter that is as efficient as possible, that manages book titles in my "library". The search should work as follows:</p>
<p>The user types in the first b letters of the book title. will be returned
Number n of book titles tha... | <p>This is a very good candidate for a trie. At each keystroke you know exactly how many books start with the prefix. This is a linear operation. So, the search for a prefix of <code>n</code> characters takes <code>O(n)</code> time. In a simple trie implementation, to get the book titles, you would need to traverse the... | search function for finding books in a datastructure | algorithm|data-structures | 2 | 47 | 1 | 72,264,491 | 72,264,491 | 0 | true | 2022-05-16T16:53:02.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
search function for finding books in a datastructure<p>I want to implement a search filter that is as efficient as possible, that manages book titles in my &... |
72,243,523 | StringVar.get() doesn't seem to be entirely working (Tkinter)<p>The relevant code is this:</p>
<pre><code>import tkinter as tk
from tkinter import ttk
import quiz
global menu_root
def get_question():
question_input = question_response.get()
answer_input = answer_response.get()
quiz.add_question(question_i... | <p>I think I was able to get the code currently in your question (using two <code>Tk()</code>s) working by changing how the <code>StringVar</code>s are created and adding a reference to them when the two <code>Entry</code> widgets are created. I've indicated the important changes in the code below with <code><-- CHA... | StringVar.get() doesn't seem to be entirely working (Tkinter) | python|tkinter | 1 | 47 | 2 | 72,265,129 | 72,265,129 | 0 | true | 2022-05-14T20:06:47.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
StringVar.get() doesn't seem to be entirely working (Tkinter)<p>The relevant code is this:</p>
<pre><code>import tkinter as tk
from tkinter import ttk
import... |
72,266,235 | How to record calculated multibody quantities during a simulation in Drake<p>The <code>drake</code> multibody plant class has a lot of functions for calculating quantities that I am interested in recording during a simulation (e.g. momentum, center of mass, etc.). What is the best way of recording data like this? I hav... | <p>Initial response from @jwnimmer-tri</p>
<blockquote>
<p>Your assessment of option (1) is correct. If you already know a reasonable dt step size for your logging that suits your needs, it can work well. If the "interesting" times are not always on a fixed schedule, this way can be difficult.</p>
<p>Relatedl... | How to record calculated multibody quantities during a simulation in Drake | drake | 0 | 47 | 1 | 72,266,271 | 72,266,271 | 0 | true | 2022-05-16T22:22:30.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to record calculated multibody quantities during a simulation in Drake<p>The <code>drake</code> multibody plant class has a lot of functions for calculat... |
72,267,680 | Regular expression that finds all matches of ${any expression}<p>The following regular expression should find all matches of <code>${any expression}</code>, the code is as follows:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class=... | <p>If you can describe the token syntax inside <code>${...}</code> you can still use a regex, too.</p>
<p>If we assume that</p>
<ul>
<li>The match starts with <code>${</code></li>
<li>The tokens inside may be separated with zero or more whitespaces</li>
<li>The tokens are separated <code>+</code>, <code>-</code>, <code... | Regular expression that finds all matches of ${any expression} | javascript|regex | 1 | 47 | 1 | 72,270,272 | 72,270,272 | 0 | true | 2022-05-17T02:53:40.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regular expression that finds all matches of ${any expression}<p>The following regular expression should find all matches of <code>${any expression}</code>, ... |
72,269,317 | Data is not added well to ListView. (C# window form)<p>I added 3 columns.</p>
<p>The modified attribute values are as follows.</p>
<ol>
<li>View - Details</li>
<li>Onwer - True</li>
<li>GirdLines - True</li>
<li>FullRowSelect - True</li>
</ol>
<pre><code>namespace TestWinForm
{
public partial class Form1 : Form
... | <p>What you have should work in detail view with columns added. Here is an example</p>
<p>Design view</p>
<p><a href="https://i.stack.imgur.com/y5M2Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y5M2Y.png" alt="enter image description here" /></a></p>
<p>In this case a instance of the following cl... | Data is not added well to ListView. (C# window form) | c#|winforms | 1 | 47 | 2 | 72,271,929 | 72,271,929 | 0 | true | 2022-05-17T06:50:20.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Data is not added well to ListView. (C# window form)<p>I added 3 columns.</p>
<p>The modified attribute values are as follows.</p>
<ol>
<li>View - Details</l... |
72,275,922 | How to create counter variable with if condition<p>So I am still a newbie in SAS and therefore any help is greatly appreciated.</p>
<p>I am trying to create 2 counter variables:
1st one - COUNTTREATMENTVISITS that counts +1 whenever FOLDERNAME variable in my dataset has any values except 'Visit 1 Screening 1','Visit 2 ... | <p>SAS Syntax for retain statement is:</p>
<pre><code>retain COUNTTREATMENTVISITS 0;
</code></pre>
<p>See documentation here : <a href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/p0t2ac0tfzcgbjn112mu96hkgg9o.htm#p115mm1hsepln9n11cxtkk7wejim" rel="nofollow noreferrer">https://documentation.sas.com... | How to create counter variable with if condition | sas | 0 | 47 | 1 | 72,276,088 | 72,276,088 | 0 | true | 2022-05-17T14:33:48.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create counter variable with if condition<p>So I am still a newbie in SAS and therefore any help is greatly appreciated.</p>
<p>I am trying to create ... |
72,273,343 | Why does writeRaster in terra give a warning message?<p>I am trying to rasters by layer using <code>terra</code> package. I am using the following code</p>
<pre><code>library(terra)
# first create a raster
r1 <- r2 <- r3 <- rast(nrow=10, ncol=10)
# Assign random cell values
values(r1) <- runif(ncell(r1))
v... | <p>That is a bug that you can ignore. It was fixed in the development version that you can install with <code>install.packages('terra', repos='https://rspatial.r-universe.dev')</code> but it has not made it to CRAN yet.</p> | Why does writeRaster in terra give a warning message? | r|terra | 0 | 47 | 2 | 72,277,626 | 72,277,626 | 0 | true | 2022-05-17T11:35:21.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does writeRaster in terra give a warning message?<p>I am trying to rasters by layer using <code>terra</code> package. I am using the following code</p>
<... |
72,302,078 | Add second character axis to ggplot2<p>I'm looking to present the results of a user survey of semantic differential scores as a boxplot, with the first semantic displayed along the default x-axis, and the second semantic displayed along a secondary top x-axis. In simple terms this can be represented as</p>
<pre><code>d... | <p>A possible option:</p>
<pre class="lang-r prettyprint-override"><code>library(tidyverse)
df <- data.frame(sem1 = c("good", "big", "red"),
sem2 = c("bad", "small", "blue"),
a = c(4, 6, 1), b = c(6, 2, 6),
... | Add second character axis to ggplot2 | r|ggplot2 | 1 | 47 | 1 | 72,302,285 | 72,302,285 | 0 | true | 2022-05-19T09:33:05.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add second character axis to ggplot2<p>I'm looking to present the results of a user survey of semantic differential scores as a boxplot, with the first seman... |
72,246,417 | React - UI not aligning on mobile<p>I am having a layout which has text and a button on the left side and the image on the right side. The layout is working fine on the desktop but when i switch to the mobile view the ui breaks. On the mobile only the image is showing up. The text and the button is not there.I am using... | <p>The Problem was it was using display flew as row for mobile as well. I used a media query to display flex as column for mobile and it worked. Thanks</p> | React - UI not aligning on mobile | reactjs|user-interface|flexbox | 0 | 47 | 1 | 72,313,720 | 72,313,720 | 0 | true | 2022-05-15T07:46:17.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React - UI not aligning on mobile<p>I am having a layout which has text and a button on the left side and the image on the right side. The layout is working ... |
72,313,077 | how to stop the first click loop after click next run<p>every click I do a loop in js, but when I click next the first loop is still running, finally there is a double loop on the same id, how do I stop the first loop and replace it with the next loop?</p>
<p>This is a program for creating chats, so when I click on per... | <p>i found solution by adding global variable for check in first loop</p>
<p>file.js</p>
<pre><code>var z = 0
var id = null
$('#firstFull').on('click', '.klik_perusahaan', function() {
id = $(this).data('id')
reload()
})
function reload() {
if (z == 0) {
show_pesan(id)
z = 1
} else {
... | how to stop the first click loop after click next run | javascript|html|jquery|ajax|loops | 0 | 47 | 2 | 72,315,832 | 72,315,832 | 0 | true | 2022-05-20T02:54:48.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to stop the first click loop after click next run<p>every click I do a loop in js, but when I click next the first loop is still running, finally there i... |
72,320,072 | How do you import a package in Android Studio?<p>I am extremely inexperienced with Android Studio - and am having an issue with my imports. I'm trying to build an app that creates music from an <code>ArrayList</code> of "note" objects (I've made this class - it has info on). I am trying to import midi driver ... | <p>You should add it in <code>MyApp/app/build.gradle</code> like this :</p>
<pre><code>dependencies {
....
implementation 'com.github.billthefarmer:mididriver:v1.24'
....
}
</code></pre> | How do you import a package in Android Studio? | java|android|jfugue | 0 | 47 | 1 | 72,321,330 | 72,321,330 | 0 | true | 2022-05-20T13:51:52.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you import a package in Android Studio?<p>I am extremely inexperienced with Android Studio - and am having an issue with my imports. I'm trying to bui... |
72,321,185 | How do I make a policy to stop inserting a row if two values from the table are the same as the values I plan to insert<p>I need to check if a booking with the same timestamp and product id has been made before inserting a new row.</p>
<p>I am struggling with making this policy and would be great if anybody could help.... | <p>You need to create a unique constraint for 2 columns <code>product_id</code> and <code>start</code>. This way you can have multiple rows with the same product_id but different timestamps.</p>
<pre><code>create table Bookings (
id bigint not null primary key,
created_at timestamp default now(),
start timestamp ... | How do I make a policy to stop inserting a row if two values from the table are the same as the values I plan to insert | database|postgresql|supabase|supabase-database | 1 | 47 | 1 | 72,321,596 | 72,321,596 | 0 | true | 2022-05-20T15:09:17.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I make a policy to stop inserting a row if two values from the table are the same as the values I plan to insert<p>I need to check if a booking with t... |
72,311,455 | Heroku Go app is no longer working after a few minutes<p>I had trouble getting my React app to run on GitHub pages, so I chose to try and serve the files on my Go backend which is on Heroku. At first I was serving the React app through the main Go backend, which did serve the React app successfully but none of my other... | <p>The problem was on heroku's end, contacting their support team resolved it.</p> | Heroku Go app is no longer working after a few minutes | go|heroku | 1 | 47 | 2 | 72,324,344 | 72,324,344 | 0 | true | 2022-05-19T21:54:00.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Heroku Go app is no longer working after a few minutes<p>I had trouble getting my React app to run on GitHub pages, so I chose to try and serve the files on ... |
72,324,585 | Null check operator used on a null value while querying the User-Data<p>So I am creating a chat-app. I need to show the list of all users in the firebase by mentioning their user-name and email.
I am getting the above stated error on line 56.
Also if I remove the null check operator in the line</p>
<pre><code>QuerySnap... | <p>You can replace below piece of code</p>
<pre><code> children: [
Text(
userName!, //error here
style: TextStyle(color: Colors.white, fontSize: 16),
),
Text(
userEmail!,
... | Null check operator used on a null value while querying the User-Data | firebase|flutter|android-studio|dart | 0 | 47 | 2 | 72,327,013 | 72,327,013 | 0 | true | 2022-05-20T20:42:36.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Null check operator used on a null value while querying the User-Data<p>So I am creating a chat-app. I need to show the list of all users in the firebase by ... |
72,328,010 | Python unittest AssertionError: 0 != []<p>I'm new to Python unittest and I'm trying to access this list:</p>
<pre><code> def setUp(self):
self.customers = [
{"name": "Mary", "pets": [], "cash": 1000},
{"name": "Alan", "p... | <p>Let's take a look at this part, the <code>get_customer_pet_count</code> function:</p>
<pre class="lang-py prettyprint-override"><code>def get_customer_pet_count(customer_number):
if ["pets"] == 0 or ["pets"] == []:
return 0
return customer_number["pets"]
</code></pre>
<p... | Python unittest AssertionError: 0 != [] | python|python-unittest|assertion | -2 | 47 | 2 | 72,328,432 | 72,328,432 | 0 | true | 2022-05-21T08:47:43.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python unittest AssertionError: 0 != []<p>I'm new to Python unittest and I'm trying to access this list:</p>
<pre><code> def setUp(self):
self.cus... |
72,332,150 | I want this message to be shown at intervals after first run<p>I made this welcome feature using HTML and CSS, which I want to display at intervals.</p>
<p>--------------------------- What I want to achieve ---------------------------</p>
<p><strong>First</strong>,
this feature should be executed <em>once</em> (<em>the... | <p>The idea is to store the date in localStorage when the page was opened for the first time. Check if stored date doesn't exist or is older than 8 hours then display the message. If it's older than 8 hours, update stored date to a value that would indicate that message was displayed twice.</p>
<pre class="lang-js pret... | I want this message to be shown at intervals after first run | javascript|html|css|animation | 0 | 47 | 2 | 72,333,389 | 72,333,389 | 0 | true | 2022-05-21T18:14:33.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want this message to be shown at intervals after first run<p>I made this welcome feature using HTML and CSS, which I want to display at intervals.</p>
<p>-... |
72,331,183 | I have an issue with Firebase error code 401<p>So recently I'm trying to make a GlobalBan script for my admin module in ROBLOX, but I came across an error when I tried to do GlobalBan.</p>
<p>Below is the error and script:</p>
<pre class="lang-lua prettyprint-override"><code>local defaultDatabase = "Private";... | <p>It turns out my auth token was the wrong one, everything's good now</p> | I have an issue with Firebase error code 401 | json|lua|firebase-authentication|roblox | 0 | 47 | 1 | 72,338,108 | 72,338,108 | 0 | true | 2022-05-21T16:00:19.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I have an issue with Firebase error code 401<p>So recently I'm trying to make a GlobalBan script for my admin module in ROBLOX, but I came across an error wh... |
72,342,563 | how to know elastic-search cluster capacity?<p>Recently I'm working in a project which requires figuring out elastic-search capacity as we will increase a lot msgs in es system per second.</p>
<p>We have 3 types of nodes in es cluster: master, data, client.</p>
<p>how do we know the maximum insert count per second our ... | <p>as per the above comments, you need to benchmark your cluster hardware and settings with your proposed data structure using a tool like <a href="https://esrally.readthedocs.io/en/stable/" rel="nofollow noreferrer">https://esrally.readthedocs.io/en/stable/</a></p> | how to know elastic-search cluster capacity? | performance|elasticsearch|bandwidth | 0 | 47 | 1 | 72,345,174 | 72,345,174 | 0 | true | 2022-05-23T02:01:43.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to know elastic-search cluster capacity?<p>Recently I'm working in a project which requires figuring out elastic-search capacity as we will increase a lo... |
72,344,385 | Is there a way to loop these 3 functions one by one on interval of 6 seconds?<p>So i have this task to constantly show 4 logos then 4 logos then 3 logos with 6 seconds interval between them. I made a function that shows first chunk of the 4 logos of the logos array. DO I need to call the function 3 times with diff arra... | <blockquote>
<p>Added the css & html part just to show the result ,you may dismiss
them</p>
</blockquote>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let logos = [{
id... | Is there a way to loop these 3 functions one by one on interval of 6 seconds? | javascript|function|loops|setinterval | -1 | 47 | 1 | 72,346,769 | 72,346,769 | 0 | true | 2022-05-23T07:00:17.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to loop these 3 functions one by one on interval of 6 seconds?<p>So i have this task to constantly show 4 logos then 4 logos then 3 logos with... |
72,352,822 | Trying to check multiple cells with .isBlank()<p>I'm currently working on an Google Apps Script that will basically reset my spreadsheet at the end of the day.</p>
<pre><code>if(ss.getRange('D2').isBlank()){
ss.getRange('C2').moveTo(ss.getRange('D2'));
}
if(ss.getRange('D3').isBlank()){
ss.getRange('C3').... | <p><strong>It is way more efficient to work with arrays instead of individual values. In this way you only have to get and set the data once.</strong></p>
<p>In the following script adjust the sheet name and desired range. Range <code>C2:D10</code> assumes that column D is part of the if statement and C is the column y... | Trying to check multiple cells with .isBlank() | javascript|google-apps-script|google-sheets | 1 | 47 | 2 | 72,353,015 | 72,353,015 | 0 | true | 2022-05-23T17:47:11.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to check multiple cells with .isBlank()<p>I'm currently working on an Google Apps Script that will basically reset my spreadsheet at the end of the da... |
72,241,883 | sqlalchemy: select from joined table<p>How do i write this sql query in sqlalchemy?</p>
<pre><code>SELECT
n.name
FROM
project_nomenclatures pn
JOIN nomenclatures_sections ns on pn.nomenclature_id = ns.nomenclature_parent_id
JOIN nomenclatures n on ns.nomenclature_id = n.id
WHERE
pn.id = 2018
</code>... | <p>It happened to be, i had to use select_from() func</p> | sqlalchemy: select from joined table | python|sqlalchemy | 1 | 47 | 1 | 72,358,634 | 72,358,634 | 0 | true | 2022-05-14T15:57:13.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sqlalchemy: select from joined table<p>How do i write this sql query in sqlalchemy?</p>
<pre><code>SELECT
n.name
FROM
project_nomenclatures pn
JO... |
72,360,194 | Splitting string in multiple variable fields using regex using python<p>I have a dataframe were each row of a certain column is a text that comes from some bad formatted form where each 'field' is after the the 'field title', an example is:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>co... | <p>Try:</p>
<pre class="lang-py prettyprint-override"><code>x = df["col"].str.extractall(r"([^\s:]+):\s*(.+?)\s*(?=[^\s:]+:|\Z)")
x = x.droplevel(level="match").pivot(columns=0, values=1)
print(x.apply(lambda x: x[x.notna()].to_dict(), axis=1).to_list())
</code></pre>
<p>Prints:</p>
<pre ... | Splitting string in multiple variable fields using regex using python | python|pandas|parsing | -1 | 47 | 1 | 72,360,521 | 72,360,521 | 0 | true | 2022-05-24T09:11:13.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Splitting string in multiple variable fields using regex using python<p>I have a dataframe were each row of a certain column is a text that comes from some b... |
72,360,628 | How to convert this response to playlist<p>How to convert this response to playlist in flutter</p>
<p>I'm using flutter_vlc_player</p>
<p>#EXTM3U</p>
<p>#EXTINF:0 tvg-logo="http://example.com/logo/" tvg-id="" ,METRO TV
<a href="http://127.0.0.1:8000/live/test/test/3" rel="nofollow noreferrer">http:/... | <p>Simple use of the <a href="https://api.flutter.dev/flutter/dart-core/String/split.html" rel="nofollow noreferrer">split</a> method would have solved your problem if you tried!!</p>
<p><strong>Code:</strong></p>
<pre><code>void main() {
String text = '''#EXTM3U
#EXTINF:0 tvg-logo="http://example.com/logo/&quo... | How to convert this response to playlist | flutter|dart|vlc | 0 | 47 | 1 | 72,361,757 | 72,361,757 | 0 | true | 2022-05-24T09:40:32.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert this response to playlist<p>How to convert this response to playlist in flutter</p>
<p>I'm using flutter_vlc_player</p>
<p>#EXTM3U</p>
<p>#EXT... |
72,364,301 | How to get backup of all the files having a specific format in linux<p>I want to copy every .ttf file to current working directory but nothing seems to happen.</p>
<p>I am currently using this command :</p>
<pre><code>find / | grep .ttf | xargs cp .
</code></pre>
<p>The detection is fine, if i run <code>find / | grep .... | <p>The syntax is <code>cp <source> <destination></code>. When you use <code>xargs cp .</code> it expands to <code>cp . <files found></code> which is why it doesn't work.</p>
<p>If your <code>cp</code> supports <code>-t</code> option, you can use <code>xargs cp -t .</code> since <code>-t</code> helps y... | How to get backup of all the files having a specific format in linux | linux|grep|find|xargs | 1 | 47 | 2 | 72,364,766 | 72,364,766 | 0 | true | 2022-05-24T14:00:50.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get backup of all the files having a specific format in linux<p>I want to copy every .ttf file to current working directory but nothing seems to happe... |
72,367,099 | Failed chess FEN creation<p>I'm creating a chess engine, and I've run into a problem with my FEN function. The "p" which stands for the black pawn is turned into a 24 in the <code>b</code> array. But only the first instance of "p" is recorded. I've done some amount of debugging, and I (think) it's n... | <p>As mentioned in a comment, try changing <code>b[index - i] = 12</code> to <code>b[index + i] = 12</code>, as below:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function ... | Failed chess FEN creation | javascript|p5.js|chess|fen | 1 | 47 | 1 | 72,367,296 | 72,367,296 | 0 | true | 2022-05-24T17:29:39.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Failed chess FEN creation<p>I'm creating a chess engine, and I've run into a problem with my FEN function. The "p" which stands for the black pawn ... |
72,367,181 | how can i change TextField hover border effect in material-ui?<p>so in persian language the direction is <code>rtl</code> .</p>
<p>i wanna know how can i change this input to my language for the project ?</p>
<p>Please take a look at this Image</p>
<p><a href="https://i.stack.imgur.com/oA2lz.png" rel="nofollow noreferr... | <p>You need to change the inner fieldset text-align to "right" instead of "left", and also change the transform X property of label, also you can change from left:0 to right:0, to move the placement of label from left to right, there are multiple solutions, just check documentation to learn how to c... | how can i change TextField hover border effect in material-ui? | css|reactjs|flexbox|material-ui|css-selectors | 0 | 47 | 1 | 72,367,352 | 72,367,352 | 0 | true | 2022-05-24T17:36:07.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can i change TextField hover border effect in material-ui?<p>so in persian language the direction is <code>rtl</code> .</p>
<p>i wanna know how can i cha... |
72,367,593 | Shell script command to find specific file extenions<p>I am looking to locate large files within my GH commit history so that I may find these files and remove them to reduce my repo size.</p>
<p>From <a href="https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history">this stack ov... | <p>Change the <code>sed</code> line to</p>
<pre><code>sed -n '/\.json$/ s/^blob//p'
</code></pre>
<p>Read up on sed and awk, they're fundamental text-processing tools for any task that falls comfortably into metastasized-oneliner range.</p> | Shell script command to find specific file extenions | git|shell|filter | 0 | 47 | 1 | 72,369,067 | 72,369,067 | 0 | true | 2022-05-24T18:11:15.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shell script command to find specific file extenions<p>I am looking to locate large files within my GH commit history so that I may find these files and rem... |
72,370,068 | Django - Unable to pass page title as url parameter in template<p>I have a BIG problem.
I need to pass article title to URL in the template</p>
<p><strong>This is my urls.py</strong></p>
<pre><code>urlpatterns = [
***
re_path(r'^view/(?P<id>\w+)/(?P<title>\w+)/$', views.view, name='view'),
***
]... | <p>Try using a string on path</p>
<p><code>path('view/<int:id>/<str:title>/', views.view, name='view'), </code></p> | Django - Unable to pass page title as url parameter in template | django|django-views|django-templates | 1 | 47 | 1 | 72,370,261 | 72,370,261 | 0 | true | 2022-05-24T22:21:56.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django - Unable to pass page title as url parameter in template<p>I have a BIG problem.
I need to pass article title to URL in the template</p>
<p><strong>Th... |
72,308,506 | VBA - Compile error: wrong number of arguments<p>Not my code, but a co-worker asked for help with his macro. He was getting "Compile error: Wrong number of arguments or invalid property assignment." on the <code>Round()</code> function.</p>
<p>Here is his offending code:</p>
<pre><code>Sub test()
start... | <p>@BigBen got it right. I had my coworker search his VBA Project for "Round" and he found he had a sub named Round. I told him that was a bad name and he should pick something else!</p> | VBA - Compile error: wrong number of arguments | excel|vba | 0 | 47 | 1 | 72,371,247 | 72,371,247 | 0 | true | 2022-05-19T17:04:58.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA - Compile error: wrong number of arguments<p>Not my code, but a co-worker asked for help with his macro. He was getting "Compile error: Wrong number... |
72,373,235 | How to index multiple objects / variables within a For loop<p>I have data that is made up of three columns:</p>
<p>Household ID, Product ID (H14aq2), Value.</p>
<p>I have approximately 7000 rows (Household IDs) which can be grouped into 12 districts and 160 products. HH Ids can appear multiple times since they consume ... | <p>You can group by multiple columns and then pivot the summarized results into a wide format like this:</p>
<pre class="lang-r prettyprint-override"><code>library(tidyverse)
data <- structure(list(
Hhid = structure(c(
"1033000301", "1033000301",
"1033000301", "103300030... | How to index multiple objects / variables within a For loop | r|loops|dplyr | 0 | 47 | 1 | 72,373,774 | 72,373,774 | 0 | true | 2022-05-25T07:06:15.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to index multiple objects / variables within a For loop<p>I have data that is made up of three columns:</p>
<p>Household ID, Product ID (H14aq2), Value.<... |
72,383,869 | Adjust filters of a Pivot Table<p>I am trying to adjust the filters of a pivot table based on predetermined settings.</p>
<p>I want to clear all the pivot table filters then select the filters.</p>
<p>The code gives me</p>
<blockquote>
<p>Run-time error '1004': Unable to set the PivotItems property of the PivotField cl... | <p>I haven't tested it, but I have amended your macro so that it loops through each pivot item. For each pivot item, if the name doesn't equal "015", "716", or "710", the visible property is set to False.</p>
<pre><code>Sub PC()
Dim currentPivotItem As PivotItem
'code for WH... | Adjust filters of a Pivot Table | excel|vba|pivot-table | 0 | 47 | 1 | 72,384,137 | 72,384,137 | 0 | true | 2022-05-25T20:35:54.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adjust filters of a Pivot Table<p>I am trying to adjust the filters of a pivot table based on predetermined settings.</p>
<p>I want to clear all the pivot ta... |
72,382,869 | Send an email when one cell in a column contains data, but not when it's deleted<p>I would like an email to be sent when something is added to a cell anywhere in column K, but not when that cell is cleared. Is this possible? Here is what I have so far. The email sends okay when I edit cell K1 (it was limited to this si... | <p>Piggybacking off Karla's answer, generally when you delete single values, the event object (<code>e</code>) is absent of a <code>value</code> key. Therefore,</p>
<h2>Try:</h2>
<pre><code>function onEdit(e) {
if (e.source.getActiveSheet().getName() === `Copy`) {
if (e.range.rowStart === 1 && e.range.co... | Send an email when one cell in a column contains data, but not when it's deleted | email|google-apps-script|google-sheets | 0 | 47 | 2 | 72,384,687 | 72,384,687 | 0 | true | 2022-05-25T18:55:55.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Send an email when one cell in a column contains data, but not when it's deleted<p>I would like an email to be sent when something is added to a cell anywher... |
72,393,095 | Cutting Strings Pyhton<p>i have a simple ui created with pyqt5</p>
<p>it loads a file, let you choose a outputfolder and creats a new txt file with additonals information.</p>
<p>the string of the loaded file is written to</p>
<pre><code>self.inputs.filename.text()
</code></pre>
<p>it looks like "C:/User/Folder/Fi... | <p>You can use the split function of a string to get the element after the last '/'. Like this :</p>
<pre><code>str_path = self.inputs.foldername.text()
split_text = str_path.split('/') #this give you a list of str element splitted by the character '/'
last_element = split_text[-1]
</code></pre>
<p>Now you can use the ... | Cutting Strings Pyhton | python-3.x|string|pyqt5 | 0 | 47 | 1 | 72,393,275 | 72,393,275 | 0 | true | 2022-05-26T14:02:46.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cutting Strings Pyhton<p>i have a simple ui created with pyqt5</p>
<p>it loads a file, let you choose a outputfolder and creats a new txt file with additonal... |
72,394,515 | Put special characters inside JavaScript variables<p>I got a json and it has special characters inside.</p>
<pre><code>myJSON = "metadata": Object {
"album-art": "album-art.png",
}
</code></pre>
<p>However - Variable declaration is not possible due to the special character "-".... | <p>It's a better practice to use <code>_</code> instead of <code>-</code>,
but you can access the variable using <code>myJSON["prop"]</code></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prett... | Put special characters inside JavaScript variables | javascript|reactjs | -1 | 47 | 2 | 72,394,592 | 72,394,592 | 0 | true | 2022-05-26T15:45:36.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Put special characters inside JavaScript variables<p>I got a json and it has special characters inside.</p>
<pre><code>myJSON = "metadata": Object ... |
72,396,840 | Should I provide hi-res website images to mobile devices? What about minimizing download size?<p>With the newer phones offering up to x3 density rendering, I am tempted to serve up x3 hi-res images to them using the HTML element srcset. However, I am concerned about the added mobile data requirements from doing so.</p>... | <p>Actually, it's more up to x4 density now: <a href="https://www.mydevice.io/#compare-devices" rel="nofollow noreferrer">https://www.mydevice.io/#compare-devices</a></p>
<p>There is unfortunately to simple way to prevent loading of huge images on small devices with really high density.</p>
<p>We should even be able to... | Should I provide hi-res website images to mobile devices? What about minimizing download size? | image|responsive-design|responsive-images|srcset | -1 | 47 | 1 | 72,402,896 | 72,402,896 | 0 | true | 2022-05-26T19:08:10.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Should I provide hi-res website images to mobile devices? What about minimizing download size?<p>With the newer phones offering up to x3 density rendering, I... |
72,401,157 | Automate a cell editor drop down using selenium<p>I am trying to automate the drop down in image <a href="https://i.stack.imgur.com/I7Taj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I7Taj.png" alt="ag grid drop down" /></a> and I used javascript and Javascript executor to change the value. I was ... | <p>This is the working python code, you can try to convert it to java. Notice that since the cells are contained in a <code>iframe</code> webelement, in order to select a cell with <code>find_element()</code> you have first to switch to the iframe, as shown in the code.</p>
<pre><code>import time
from selenium import w... | Automate a cell editor drop down using selenium | java|selenium | 1 | 47 | 1 | 72,415,696 | 72,415,696 | 0 | true | 2022-05-27T06:11:31.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Automate a cell editor drop down using selenium<p>I am trying to automate the drop down in image <a href="https://i.stack.imgur.com/I7Taj.png" rel="nofollow ... |
72,276,348 | MySQL: slow select without where and joins<p>I have the following table:</p>
<pre><code>| ticket | CREATE TABLE `ticket` (
`ticket_id` bigint(20) NOT NULL AUTO_INCREMENT,
`client_id` binary(16) NOT NULL,
`owner_id` binary(16) DEFAULT NULL,
`requester_id` binary(16) NOT NULL,
`ticket_type` varchar(15) COLLATE ... | <p>Finally we fixed this by setting wsrep_sync_wait to 0.</p> | MySQL: slow select without where and joins | mysql|performance|profiling | 0 | 47 | 1 | 72,446,898 | 72,446,898 | 0 | true | 2022-05-17T15:01:46.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL: slow select without where and joins<p>I have the following table:</p>
<pre><code>| ticket | CREATE TABLE `ticket` (
`ticket_id` bigint(20) NOT NULL ... |
72,363,677 | CSS menu aligns to left but when floating to right, the order of menu items are reversed<p>I know others have asked this question and I'm not able to wrap my head around those solutions due to the complexity of the CSS being used and I have submenus within. This was made by an online menu CSS generator. This is the pag... | <p>Please check the code below:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>#menu {
background: #00338d;
color: #fff;
height: 45px;
padding-left: 18px;
border-r... | CSS menu aligns to left but when floating to right, the order of menu items are reversed | css-float|right-to-left | 0 | 47 | 1 | 72,452,975 | 72,452,975 | 0 | true | 2022-05-24T13:22:21.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS menu aligns to left but when floating to right, the order of menu items are reversed<p>I know others have asked this question and I'm not able to wrap my... |
72,374,283 | reset password link is not redirecting to reset password page in laravel<p>In my website firstly it was working and suddenly yesterday i got this bug where steps are as follows</p>
<ol>
<li>request for reset password</li>
<li>when received mail click on reset password</li>
<li>I get following link to reset my password ... | <p>i got the solution in .env file i just replace my website name with following</p>
<p><code> app_name= websitename.com</code> to <code>app_name= www.websitename.com</code></p>
<p>i didn't get what was the issue but this one worked for me</p>
<p>if someone knows the reason i will be glad to know that</p> | reset password link is not redirecting to reset password page in laravel | php|laravel|laravel-8|reset-password | 0 | 47 | 1 | 72,474,510 | 72,474,510 | 0 | true | 2022-05-25T08:27:09.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
reset password link is not redirecting to reset password page in laravel<p>In my website firstly it was working and suddenly yesterday i got this bug where s... |
72,292,687 | AttributeError: type object 'WebTablePage' has no attribute 'load' in selenium using pytest<p>I am learning selenium in python with pytest, I am facing this below error. I have searched this error all over the internet and tried all the possible advice, but nothing is working.
I am just trying to load the website, it i... | <p>The <code>WebTablePage</code> constructor is called incorrectly. It must be called with the <code>browser</code> argument.</p>
<p>Change this:</p>
<pre class="lang-py prettyprint-override"><code>def test_webtablepage(browser):
Webtable_page = WebTablePage
</code></pre>
<p>To this:</p>
<pre class="lang-py prettyp... | AttributeError: type object 'WebTablePage' has no attribute 'load' in selenium using pytest | python|selenium|selenium-webdriver|pytest|attributeerror | 0 | 47 | 2 | 72,607,826 | 72,607,826 | 0 | true | 2022-05-18T16:16:31.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AttributeError: type object 'WebTablePage' has no attribute 'load' in selenium using pytest<p>I am learning selenium in python with pytest, I am facing this ... |
72,386,801 | Check if a comma separated data attribute contains a list of values<p>Originally from <a href="https://stackoverflow.com/questions/39867170/multiple-filter-using-jquery-with-data-attribute">this question</a> - I have modified this to suit.</p>
<p>However, my data attributes (i.e. data-mktg-brand) are comma separated.</... | <p>Couple of changes done to achieve what is required. There is a spelling mistake in below mentioned code (div id).</p>
<pre><code>var $items = $('#mtkg-resource-list article');
</code></pre>
<p>Use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf" rel="nofollow ... | Check if a comma separated data attribute contains a list of values | javascript|jquery | 0 | 47 | 2 | 72,387,533 | 72,387,533 | 0 | true | 2022-05-26T04:45:00.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if a comma separated data attribute contains a list of values<p>Originally from <a href="https://stackoverflow.com/questions/39867170/multiple-filter-u... |
72,280,778 | Issues with Counting Records with SQL across multiple tables<p>There are three tables: Cases, Calls, and SubEvents.</p>
<p>The table schema is a Case can have multiple Calls, and each Call can have multiple SubEvents.
I'd like to use a query to get a count of all calls and a count of all sub-events (if there are any) f... | <p>Try this:</p>
<pre><code>SELECT
c.casename
,Count(e.callid) AS EventTotal
,sum(s.id) AS SubEventTotal
FROM (cases AS c INNER JOIN calls AS e ON c.contactid = e.contactid)
left JOIN (select callid, count(s.id) as id from tblSubEvents s group by callid) AS s ON e.callid = s.callid
WHERE e.calldate > #1/1/2... | Issues with Counting Records with SQL across multiple tables | sql|ms-access | 1 | 47 | 2 | 72,281,200 | 72,281,200 | 0 | true | 2022-05-17T21:19:25.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issues with Counting Records with SQL across multiple tables<p>There are three tables: Cases, Calls, and SubEvents.</p>
<p>The table schema is a Case can hav... |
72,355,570 | Double digit numeric range regex<p>I've been trying to write a regex to match for Severity Errors 17 - 25, looking at the error log. (I can provide the full code necessary to get the error log records into a staging table for processing, but I figured it wasn't necessary in relation to the regex)</p>
<p>The closest I'v... | <blockquote>
<p>Is it possible to write a SQL Server regex for a numeric range 17 -
25?</p>
</blockquote>
<p>Not with native TSQL.</p>
<p>You could write a CLR function to do this though.</p>
<p>Using native TSQL string functions you could potentially parse out the severity value and then test it.</p>
<pre><code>WHERE ... | Double digit numeric range regex | sql|sql-server|tsql | 0 | 47 | 1 | 72,358,424 | 72,358,424 | 0 | true | 2022-05-23T22:55:30.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Double digit numeric range regex<p>I've been trying to write a regex to match for Severity Errors 17 - 25, looking at the error log. (I can provide the full ... |
72,281,010 | Why aren't all my letters showing up in my hangman javascript game?<p>This is my first post here so excuse my formatting if it's incorrect. I am building a hangman game and I am getting the letters to replace my underscores UNLESS its a double letter.</p>
<p>example: cheese returns only c h e _ s _</p>
<p>I have attac... | <pre class="lang-js prettyprint-override"><code>let index = chars.indexOf(guessedLetter)
</code></pre>
<p>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf" rel="nofollow noreferrer"><code>indexOf</code> method</a> only gets the first match it finds.</p>
<p>Sinc... | Why aren't all my letters showing up in my hangman javascript game? | javascript | 0 | 47 | 1 | 72,281,075 | 72,281,075 | 0 | true | 2022-05-17T21:47:47.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why aren't all my letters showing up in my hangman javascript game?<p>This is my first post here so excuse my formatting if it's incorrect. I am building a h... |
72,337,180 | passing argument 1 and 2 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]<p>Hello so I've been working a little prgramme which is sort of a calculator (I'm a beginner) and well as you can see in the tittle at then end of the code, the two if strcmp doesn't work. And vscode is telling me (for the... | <p>The variables <code>ifyorn</code>, <code>y</code> and <code>n</code> are declared having the type <code>char</code>.</p>
<pre><code>char ifyorn;
char y = 'y';
char n = 'n';
</code></pre>
<p>The function <code>strcmp</code> expects arguments of the pointer type <code>char *</code> that point to strings.</p>
<p>So the... | passing argument 1 and 2 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion] | c|if-statement|char|user-input|strcmp | -1 | 47 | 2 | 72,337,283 | 72,337,283 | 0 | true | 2022-05-22T11:31:39.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
passing argument 1 and 2 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]<p>Hello so I've been working a little prgramme which is sor... |
72,266,550 | Not able to push data in an empty array, I'm getting that data from an external api, using https module in Node js<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var https = requir... | <p>Your issue is that the callback to <code>https.get</code> - i.e. <code>(res) =></code> is called <em>asynchronously</em> - therefore, <code>console.log(arr);</code> is executed before the 25 <code>https.get</code> requests are even made - you'll see that <code>arr.push</code> does actually work if you <code>conso... | Not able to push data in an empty array, I'm getting that data from an external api, using https module in Node js | javascript|node.js|api|https|get | 0 | 47 | 1 | 72,266,769 | 72,266,769 | 0 | true | 2022-05-16T23:14:25.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not able to push data in an empty array, I'm getting that data from an external api, using https module in Node js<p><div class="snippet" data-lang="js" data... |
72,348,924 | how to get the object with keys/value nested inside tuple from a Json output?<p>how to get the object with keys/value nested inside tuple from a Json data ? I have been trying to get the below Json output for an api request and loaded the Json output - but i end up with this error</p>
<pre><code>the JSON object must be... | <p>According previous answer, it's almost correct. Must be</p>
<blockquote>
<p>output = json.loads(output[0])</p>
</blockquote> | how to get the object with keys/value nested inside tuple from a Json output? | python|json|tuples | 0 | 47 | 2 | 72,349,757 | 72,349,757 | 0 | true | 2022-05-23T12:59:14.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to get the object with keys/value nested inside tuple from a Json output?<p>how to get the object with keys/value nested inside tuple from a Json data ? ... |
72,263,684 | How can I combine two views into one to condense my data?<p>I have two tables, one with names of players and the # of games won and one with names of players and the # of games lost. I'd like to combine them to show the names of players, # games won and # of games lost into one table</p>
<p>Also would like to be able t... | <p>You can apply a <code>UNION</code> operation and then select the <code>SUM</code> for each <code>g_won</code> and <code>g_lost</code>:</p>
<pre><code>SELECT name,
SUM(g_won) AS g_won,
SUM(g_lost) AS g_lost,
SUM(g_won+g_lost) AS g_played
FROM (SELECT name,
g_won,
... | How can I combine two views into one to condense my data? | mysql|sql | 0 | 47 | 2 | 72,264,695 | 72,264,695 | 0 | true | 2022-05-16T18:04:11.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I combine two views into one to condense my data?<p>I have two tables, one with names of players and the # of games won and one with names of players... |
72,368,359 | Is it possible to organize data from a column separated by dash in blade of laravel 8?<p>I wanted to clear this doubt, in the column of my table (variant) I am saving the values separated by a dash (-), in the display of these values on the page in the product I wanted to know if it is possible to organize them by look... | <pre><code>$data=collect([
(object)['dash_grouped'=>'White-S','other'=>1],
(object)['dash_grouped'=>'White-M','other'=>2],
(object)['dash_grouped'=>'Black-XS','other'=>3],
(object)['dash_grouped'=>'Black-XL','other'=>4],
]);
</code></pre>
<p>If you have the data in a collection i... | Is it possible to organize data from a column separated by dash in blade of laravel 8? | laravel | 0 | 47 | 1 | 72,369,591 | 72,369,591 | 0 | true | 2022-05-24T19:18:09.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to organize data from a column separated by dash in blade of laravel 8?<p>I wanted to clear this doubt, in the column of my table (variant) I ... |
72,342,735 | How to adjust divs to decrease their size as you add new sister divs?<p>I need a parent div to occupy the entire width of the screen and when adding child divs inside the parent div, the child divs will decrease the width so that they all fit inside the parent div without having scrool.
Equal behavior of browsers when ... | <p>Just use <code>display: flex;</code> on the container. The default <code>flex-shrink</code> will handle the rest:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>document.qu... | How to adjust divs to decrease their size as you add new sister divs? | html|css | 2 | 47 | 3 | 72,342,843 | 72,342,843 | 0 | true | 2022-05-23T02:38:40.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to adjust divs to decrease their size as you add new sister divs?<p>I need a parent div to occupy the entire width of the screen and when adding child di... |
72,333,620 | Regex in Python returns nothing (search parameters keywords for search for when using regex)<p>I'm not so sure about how regex works, but I'm trying to make a project where (haven't still set it up, but working on the pdf indexing side of code first with a test pdf) to analyze the mark scheme pdf, and based on that do ... | <p>You're matching only one single space between the digits and the marks, but if you look at the output of <code>text</code>, there is more than one space between the digits and marks.</p>
<pre><code>'9700/12 Cambridge International AS/A Level – Mark Scheme March 2019\nPUBLISHED \n \nQuestion Answer Marks \n1 A ... | Regex in Python returns nothing (search parameters keywords for search for when using regex) | python|regex | 0 | 47 | 1 | 72,333,668 | 72,333,668 | 0 | true | 2022-05-21T22:24:20.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex in Python returns nothing (search parameters keywords for search for when using regex)<p>I'm not so sure about how regex works, but I'm trying to make ... |
72,386,300 | Im trying to get calculate two tkinter entries with a button<p>I have tried StringVar, I've tried set().
Note: The program successfully calculates the value and returns the answer in a seperate pop-up, but I would like it to display the answer in the readonly "yards" entry field as well.</p>
<pre><code>import... | <p>You do have to use DoubleVar to update the Entry element:</p>
<pre><code>yards_entry_var = tk.DoubleVar(inputFrame, 0)
</code></pre>
<p>Then you should place it inside the Entry element 'textvariable':</p>
<pre><code>yardsEntry = ttk.Entry(inputFrame, textvariable=yards_entry_var, state="readonly")
</code>... | Im trying to get calculate two tkinter entries with a button | python|tkinter | 0 | 47 | 1 | 72,403,869 | 72,403,869 | 0 | true | 2022-05-26T03:17:15.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Im trying to get calculate two tkinter entries with a button<p>I have tried StringVar, I've tried set().
Note: The program successfully calculates the value ... |
72,287,520 | Angular Behaviour Subject does not reflect change status in a component<p>I have a MEAN project with Angular Behaviour Subject emitting the status of logged in user.</p>
<p><strong>Problem:</strong> When user logs in, app component detects the change in user status. But the header component(which is part of app compone... | <p>Assuming http call actually returns something and there is something to be nexted, then if it is an observable that you have created yourself, it may well be that its value changed before you subscribe to it.</p>
<p>But what I don't understand is that why are you making accountSubject type of BehaviourSubject but th... | Angular Behaviour Subject does not reflect change status in a component | angular | 0 | 47 | 2 | 72,288,141 | 72,288,141 | 0 | true | 2022-05-18T10:32:31.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular Behaviour Subject does not reflect change status in a component<p>I have a MEAN project with Angular Behaviour Subject emitting the status of logged ... |
72,278,699 | Finding Multiple of 3 in a Array Method and returning it<p>I'm currently trying to find all the multiple values of three in an array. I know hot to do it without using a method, but when I'm trying to invoke the method and retrieve the returned array, it gives me errors and won't work.</p>
<pre><code>public class Scra... | <p>There are a few problems in your code. I think that in your second instruction of the <code>run</code> method, you were attempting to invoke the <code>findMultipleOfThree</code> method you defined below.</p>
<p>To invoke a method, you simply need to type its name and pass the parameters it's expecting. In your case,... | Finding Multiple of 3 in a Array Method and returning it | java|arrays|methods | 0 | 47 | 2 | 72,279,757 | 72,279,757 | 0 | true | 2022-05-17T18:01:11.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding Multiple of 3 in a Array Method and returning it<p>I'm currently trying to find all the multiple values of three in an array. I know hot to do it wit... |
72,363,892 | Cast String as Date in GBQ<p>I have a query in Big Query where the payload.date is a string, and I would like to CAST this as a date. How can I do this using the sample query below?</p>
<p>I would like to have payload.date be a date and not a string.</p>
<p><code>SELECT count(number) FROM `sample_gbq_table` WHERE paylo... | <p>Welcome Devin,</p>
<p>Here is an example query where I have used one of the dates you shared. In short, you can simply parse this string format of date into a date object using the <code>DATE()</code> function:</p>
<pre class="lang-sql prettyprint-override"><code>WITH date AS(
SELECT
"2022-04-27T00:00:01.00... | Cast String as Date in GBQ | google-bigquery | 0 | 47 | 1 | 72,364,214 | 72,364,214 | 0 | true | 2022-05-24T13:35:06.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cast String as Date in GBQ<p>I have a query in Big Query where the payload.date is a string, and I would like to CAST this as a date. How can I do this using... |
72,239,542 | Get node path relative to the SConstruct from inside a SConscript<p>In a hierarchical build, one of my <code>SConscript</code> files, located in a sub-directory needs to print paths of a few nodes (for use by an external script). However, the paths need to be relative to the main directory, in which <code>SConstruct</c... | <p>Node object have two properties that appear to store paths relative to the root directory:</p>
<ul>
<li><code>node.path</code></li>
<li><code>node.relpath</code></li>
</ul>
<p>(<a href="https://scons.org/doc/production/HTML/scons-man.html#node_objects" rel="nofollow noreferrer">link to the manual</a>)</p>
<p>Their d... | Get node path relative to the SConstruct from inside a SConscript | scons | 2 | 47 | 1 | 72,239,543 | 72,239,543 | 0 | true | 2022-05-14T10:55:29.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get node path relative to the SConstruct from inside a SConscript<p>In a hierarchical build, one of my <code>SConscript</code> files, located in a sub-direct... |
72,245,365 | Can't get user input to append to a file<p>So I'm trying to use the command <code>file.write(newItem + "\n")</code> to append text to a file but I'm having a problem. So here is my code:</p>
<pre><code>file=open("devices.txt","a")
while True:
newItem = input('Enter device name:')
... | <p>You'll need to close your file object and put the write inside <code>while</code> block</p>
<pre class="lang-py prettyprint-override"><code>file=open("devices.txt","a")
while True:
newItem = input('Enter device name:')
if newItem == 'exit':
break
file.write(newItem + "\n... | Can't get user input to append to a file | python | 0 | 47 | 1 | 72,245,381 | 72,245,381 | 0 | true | 2022-05-15T03:38:51.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't get user input to append to a file<p>So I'm trying to use the command <code>file.write(newItem + "\n")</code> to append text to a file but I'... |
72,297,157 | Integer partition N into M parts in parallel<p>I am trying to randomly generate integer partitions (N into M parts) in pytorch with a minimum partition size of 1.</p>
<p>For example, <code>(3, 1, 1)</code> and <code>(4, 1, 0)</code> are both partitions of 5 into 3 parts but <code>(4, 1, 0)</code>'s minimum partition si... | <p>Here's a solution that works in limited cases, M hast to divide N, 2 has to divide M, and the maximium is limited, but this is the behaviour I wanted.</p>
<p>You start of with the equal partition then calculate a delta that sums to zero...</p>
<pre class="lang-py prettyprint-override"><code>M = 4
N = 16
MINIMUM = 1
... | Integer partition N into M parts in parallel | algorithm|pytorch|integer-partition | 0 | 47 | 1 | 72,297,158 | 72,297,158 | 0 | true | 2022-05-18T23:51:07.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Integer partition N into M parts in parallel<p>I am trying to randomly generate integer partitions (N into M parts) in pytorch with a minimum partition size ... |
72,319,880 | How to attach Encrypted PDF to gmail's attachment using python<p>I have this block of code that will attach a file to gmail. it works fine with other file type but when dealing with "encrypted pdf" (but the file can be viewed normally or MANUALLY attach to gmail without entering password) the 'pdf' attachment... | <p>I have found a solution from a post about pdf display empty after the attach process.
so below is the answer for my own problem. .</p>
<pre><code>def create_message_with_attachment():
message = MIMEMultipart()
message = MIMEText(message_data, "plain")
message.attach(message )
... | How to attach Encrypted PDF to gmail's attachment using python | python|gmail-api | 0 | 47 | 1 | 72,321,053 | 72,321,053 | 0 | true | 2022-05-20T13:38:19.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to attach Encrypted PDF to gmail's attachment using python<p>I have this block of code that will attach a file to gmail. it works fine with other file ty... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.