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,389,623 | PHP hash_hmac(sha512) to Python new hmac()<p>php code</p>
<pre><code> function get_signature($data, $secret_key) {
$algo = "sha512";
$result = hash_hmac(
$algo,
$data,
$secret_key,
false
);
return $result;
}
</code></pre>
<p>p... | <p>the code is working properly.
the issue was on another code.</p> | PHP hash_hmac(sha512) to Python new hmac() | python|php|hash|hmac | 0 | 46 | 1 | 72,643,241 | 72,643,241 | 0 | true | 2022-05-26T09:27:13.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP hash_hmac(sha512) to Python new hmac()<p>php code</p>
<pre><code> function get_signature($data, $secret_key) {
$algo = "sha512";
... |
72,241,652 | How to create object having read-only attributes dynamically<p>I want to create object which is having read-only attributes.
And it need to be initialize dynamically.</p>
<p>Here is situation I want.</p>
<pre class="lang-py prettyprint-override"><code>readOnlyObject = ReadOnlyClass({'name': 'Tom', 'age': 24})
print(re... | <p>Consider starting with <code>__setattr__</code>:</p>
<pre><code>>>> class ReadOnlyClass:
... def __init__(self, **kwargs):
... self.__dict__.update(kwargs)
...
... def __setattr__(self, key, value):
... raise AttributeError("can't set attribute")
...
>>> reado... | How to create object having read-only attributes dynamically | python|properties|attributes|readonly | 0 | 46 | 2 | 72,241,774 | 72,241,774 | 0 | true | 2022-05-14T15:28:27.213Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create object having read-only attributes dynamically<p>I want to create object which is having read-only attributes.
And it need to be initialize dyn... |
72,260,977 | How to match any string between paranthesis that can contain paranthesis?<p>I am trying to create a JavaCC parser and I am facing an issue.</p>
<p>I want to return everything between parentheses in my text but the string between those parentheses may contain some.</p>
<p>For example, I have this line :
<code>Node(new M... | <p>There may be a simpler solution, but here's mine:</p>
<pre><code>SKIP :
{ " " | "\t" | "\n" | "\r" | "\f" | "\r\n" }
TOKEN :
{
< #LETTER : ( [ "a"-"z" ] | [ "A"-"Z" ] ) >
| < #DIGIT ... | How to match any string between paranthesis that can contain paranthesis? | parsing|token|javacc | 0 | 46 | 1 | 72,358,555 | 72,358,555 | 0 | true | 2022-05-16T14:38:19.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to match any string between paranthesis that can contain paranthesis?<p>I am trying to create a JavaCC parser and I am facing an issue.</p>
<p>I want to ... |
72,255,723 | Whether the random numbers generated by $urandom_range() are 'cyclical random'?<p>It's a Sample from SystemVerilog for Verification-A Guide to Learning the Testbench Language Features.
In class Driver, if <code>drop==0</code> , transaction will be lost. Why <code>drop = ($urandom_range(0,99) == 0)</code> can randomly d... | <p>$urandom_range is a probabilistic distribution function; it is not cyclical. Either the comment is not precisely worded, or the code was not implemented properly.</p> | Whether the random numbers generated by $urandom_range() are 'cyclical random'? | verilog|system-verilog | 0 | 46 | 1 | 72,257,026 | 72,257,026 | 0 | true | 2022-05-16T07:45:15.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Whether the random numbers generated by $urandom_range() are 'cyclical random'?<p>It's a Sample from SystemVerilog for Verification-A Guide to Learning the T... |
72,332,131 | PowerShell: assign multiple values to variable, but later call only half?<p><strong>Edit to make the question more simple</strong></p>
<p>I'm essentially just trying to call only part of a variable that has multiple values.</p>
<p>example:</p>
<p>I have this variable</p>
<pre><code>$a = "alocf", "arbmi&q... | <p>If I understood correctly, what you're looking to accomplish is to dynamically split an array into chunks, if my assumption is correct, you could use this helper <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-7.2" rel="nofollow noreferrer">... | PowerShell: assign multiple values to variable, but later call only half? | powershell | 1 | 46 | 1 | 72,333,799 | 72,333,799 | 0 | true | 2022-05-21T18:12:12.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PowerShell: assign multiple values to variable, but later call only half?<p><strong>Edit to make the question more simple</strong></p>
<p>I'm essentially jus... |
72,307,656 | Calculate time between events SQL Server<p>I am trying to write query which will calculate time difference between rows in but I fail horribly.</p>
<p>Problem is that events are not always one after another and if this is the case it should return NULL value or skip it completely.</p>
<p>Example table</p>
<div class="s... | <p>This will work on your sample data:</p>
<pre><code>with Data as (
select *,
case when RenderedDescription like '%started%' then 'S'
when RenderedDescription like '%stopped%' then 'E' end as Code,
count(case when RenderedDescription like '%started%' then 1 end)
over (parti... | Calculate time between events SQL Server | sql-server | 0 | 46 | 1 | 72,308,399 | 72,308,399 | 0 | true | 2022-05-19T15:57:19.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate time between events SQL Server<p>I am trying to write query which will calculate time difference between rows in but I fail horribly.</p>
<p>Proble... |
72,390,282 | How can I change date stamps in python<p>how can I convert the date format from</p>
<p>Current format : [day] [month] [day value] [hour]:[minute]:[second] [time zone difference] [year]</p>
<p>to</p>
<p>New format : [year]-[month value]-[day value] [hour]:[minute]:[second]</p>
<p>For example, a current format va... | <p>You can use <code>parser</code>. Then use <code>strftime</code> to format the <code>datetime</code> object</p>
<pre class="lang-py prettyprint-override"><code>from dateutil import parser
x = 'Tue Feb 04 17:04:01 +0000 2020 '
y = parser.parse(x).strftime('%Y-%m-%d %T')
</code></pre>
<pre><code>>>> y
'2020-0... | How can I change date stamps in python | python | -2 | 46 | 1 | 72,390,341 | 72,390,341 | 0 | true | 2022-05-26T10:21:09.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I change date stamps in python<p>how can I convert the date format from</p>
<p>Current format : [day] [month] [day value] [hour]:[minute]:[second] ... |
72,353,677 | eliminate a variable for an accumulation operation<p>The following code produces the desired result but is there a way to refactor it to eliminate the <code>accumulator</code> variable?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre c... | <p>The <code>|| o</code> part doesn’t make sense (objects are always truthy), and the repeated spread can become a serious performance trap. It’s also good practice to start with <code>Object.create(null)</code> when using an object as a map to avoid keys colliding with things on <code>Object.prototype</code> (even tho... | eliminate a variable for an accumulation operation | javascript | 0 | 46 | 3 | 72,353,832 | 72,353,832 | 0 | true | 2022-05-23T19:06:41.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
eliminate a variable for an accumulation operation<p>The following code produces the desired result but is there a way to refactor it to eliminate the <code>... |
72,318,957 | How to assign a user to a model in my database<pre><code> from django.db import models
from datetime import datetime
from django.contrib.auth import get_user_model
User = get_user_model()
class Blog(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
headline =... | <p>Because you've added the non-nullable field <code>user</code> to <code>Blog</code> Django needs to add a user to <em>all</em> instances of blogs in the database, both new ones and existing. If you've created a blog instance in the database, what should Django do with its new user column? That's what it is asking you... | How to assign a user to a model in my database | python|django|database|class|model | 0 | 46 | 3 | 72,319,883 | 72,319,883 | 0 | true | 2022-05-20T12:28:56.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to assign a user to a model in my database<pre><code> from django.db import models
from datetime import datetime
from django.contrib.auth impo... |
72,257,297 | Convert single key-value pair into multiples pairs<p>A script returns me an array containing the following key-value pair :</p>
<pre class="lang-javascript prettyprint-override"><code>[{"analytes":"ALBS,CRP,FR,FERHN"}]
</code></pre>
<p>How would you proceed in order to obtain multiple key-value pair... | <p>You can use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split" rel="nofollow noreferrer">string.split()</a> along with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer">Array.map()</a></p... | Convert single key-value pair into multiples pairs | javascript|arrays|key-value|ecmascript-5 | -1 | 46 | 1 | 72,258,320 | 72,258,320 | 0 | true | 2022-05-16T09:52:38.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert single key-value pair into multiples pairs<p>A script returns me an array containing the following key-value pair :</p>
<pre class="lang-javascript p... |
72,297,489 | for loop executing only one iteration python<p>Hi guys I'm running a program that is supposed to run for 'max_iter' times in which a nested loop will run for 'mv_max' times in this later there is a for loop that checks if variable 'check' is True it will increase 'mv' counter until 'mv_max'. My problem is the for loop ... | <p>It was a silly error I forgot to reset the counter 'mv' here is the correct code:</p>
<pre><code> for i in range(1, neighbors + 1):
mv=1
move_history = tabu_list.copy()
while mv <= mv_max:
prohibited = []
print("----------------------------------------------... | for loop executing only one iteration python | python|loops|for-loop | 0 | 46 | 1 | 72,297,636 | 72,297,636 | 0 | true | 2022-05-19T00:52:24.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
for loop executing only one iteration python<p>Hi guys I'm running a program that is supposed to run for 'max_iter' times in which a nested loop will run for... |
72,243,341 | Recursion python - counting vowels in a string<p>The following code is from geeks for geeks - <a href="https://www.geeksforgeeks.org/program-count-vowels-string-iterative-recursive/" rel="nofollow noreferrer">link</a>
When I executed to visualize the code line by line on pythontutor.com, I understand that n is being re... | <p>Take a look at how these functions are evaluated:</p>
<pre class="lang-py prettyprint-override"><code>countVowels("abc", 3) = countVowels("abc", 2) + isVowel("abc"[2])
= (countVowels("abc", 1) + isVowel("abc"[1])) + isVowel("abc"[2])
... | Recursion python - counting vowels in a string | python|recursion | -1 | 46 | 1 | 72,243,445 | 72,243,445 | 0 | true | 2022-05-14T19:33:37.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Recursion python - counting vowels in a string<p>The following code is from geeks for geeks - <a href="https://www.geeksforgeeks.org/program-count-vowels-str... |
72,346,265 | javascript or jquery find nextSibling<p>I have a shopping cart view
<a href="https://i.stack.imgur.com/qmBiI.png" rel="nofollow noreferrer">cart list count</a>
and this document</p>
<pre><code><div class="input-group input-number-group">
<div class="input-group-button" onclick="dec... | <p>There's no reason why you couldn't add the event handler using addEventListener. Even if the element you are trying to attach the handler is created dinamically after the document was loaded. But since you didn't specify anything in details about that point on time, all I could do was suggesting how to select the si... | javascript or jquery find nextSibling | javascript|jquery|closest|nextsibling | -1 | 46 | 1 | 72,346,448 | 72,346,448 | 0 | true | 2022-05-23T09:32:54.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
javascript or jquery find nextSibling<p>I have a shopping cart view
<a href="https://i.stack.imgur.com/qmBiI.png" rel="nofollow noreferrer">cart list count</... |
72,259,682 | Match this name and mac address if it is not associated with this ip using regex<p>I am trying to match the name and mac address that is NOT associated with the ip 172.16.1.102 using regex in the test string example below.</p>
<p>In this case the output I would like is (eth1, 00:e0:4c:68:ce:52).
As 'inet 172.16.1.102' ... | <p>One way of doing it with regex is by checking that your ip is not found between the name and the address:</p>
<pre><code>^(eth\d+)((?!.*172.16.1.102)[^\n]+\n)*ether ([\w:]+)((?!.*172.16.1.102)[^\n]+\n)*$
</code></pre>
<p>Explanation:</p>
<ul>
<li><code>(eth\d+)</code>: eth word with more than one digit</li>
<li><cod... | Match this name and mac address if it is not associated with this ip using regex | python|regex | 0 | 46 | 1 | 72,260,064 | 72,260,064 | 0 | true | 2022-05-16T13:02:36.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Match this name and mac address if it is not associated with this ip using regex<p>I am trying to match the name and mac address that is NOT associated with ... |
72,316,875 | How to remove Item from an array with react and firebase<p>When I add an item to the array it works but the splice does not.</p>
<pre><code>const handleSportsFollowed = async (sport) => {
if (selectedSports.includes(sport)) {
selectedSports.splice(sport, 1);
alert("Removed");
} else {
selec... | <p>You need to find the index for splice. Check <a href="https://if%20(selectedSports.includes(sport))%20%7B%20%20%20selectedSports.splice(selectedSports.indexOf(sport),%201);%20%20%20console.log(%22if%20selectedSports%20%22,%20selectedSports);%20%7D%20else%20%7B%20%20%20selectedSports.push(sport);%20%20%20console.log(... | How to remove Item from an array with react and firebase | javascript | 1 | 46 | 3 | 72,317,340 | 72,317,340 | 0 | true | 2022-05-20T09:49:55.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove Item from an array with react and firebase<p>When I add an item to the array it works but the splice does not.</p>
<pre><code>const handleSport... |
72,324,859 | AlertDialog setItems with a list from room database: getValue() returns null<p>I'm simply trying to select from a list of Artists in my room database in an AlertDialog. Calling getValue() on the LiveData object from the viewModel consistently gives me null. Do I really need to make a ListAdapter for something this si... | <p>You always get <code>null</code> because nobody is observing your <code>Flow->LiveData</code>-chain. LiveData itself will only trigger and perform its work if somebody is observing it.</p>
<p>In your case I think you want a one-time request to receive the data from your DB and should use a suspend function and co... | AlertDialog setItems with a list from room database: getValue() returns null | android|android-alertdialog|kotlin-coroutines|android-livedata | 0 | 46 | 1 | 72,325,956 | 72,325,956 | 0 | true | 2022-05-20T21:17:47.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AlertDialog setItems with a list from room database: getValue() returns null<p>I'm simply trying to select from a list of Artists in my room database in an A... |
72,298,066 | How can I get only first childnode?<pre class="lang-xml prettyprint-override"><code><Setup>
<group id="test1">
<group id="testist1">
<value>Exam1</value>
<value>Exam2</value>
</group2>
</group>
... | <p>One thing you might consider is using the <code>System.Xml.Linq</code> namespace which is designed to search Xml hierarchies. In case you're not familiar, here are two examples of searches that let you pick exactly what you want out of the hierarchy. Now, I'm not 100% sure what your asking so if I miss the mark let ... | How can I get only first childnode? | c#|xml | 0 | 46 | 1 | 72,298,672 | 72,298,672 | 0 | true | 2022-05-19T02:46:27.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I get only first childnode?<pre class="lang-xml prettyprint-override"><code><Setup>
<group id="test1">
<group id... |
72,273,006 | Invoke-ResMethod Rest API<p>This is my first time reaching out on here.</p>
<p>I am trying to create a script for Ivanti Appsense using json code powershell, but i hit an issue</p>
<p>i keep getting a return message "te request is invalid" i am hoping i can get some help
so in powershell this is my code</p>
<... | <p>This might not be the whole answer to your problem, but one issue is you're sending invalid json to the API.</p>
<p>You can use PowerShell's features to generate the json string programmatically rather than do it by hand yourself. This way PowerShell will give you more meaningful error messages if your syntax is inv... | Invoke-ResMethod Rest API | json|powershell|api | 0 | 46 | 1 | 72,274,640 | 72,274,640 | 0 | true | 2022-05-17T11:10:44.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Invoke-ResMethod Rest API<p>This is my first time reaching out on here.</p>
<p>I am trying to create a script for Ivanti Appsense using json code powershell,... |
72,280,067 | Extract Name Text from nested table in python using Beautiful Soup<p>I am relatively new to web scraping using Python, and I am having a lot of difficulty pulling the name value out of an HTML table row on CoinMarketCap.com. Their structure is unfamiliar to me. I have tried several methods, both on stack overflow and o... | <p>These <code>sc-16r8icm-0 sc-1teo54s-1 dNOTPP</code> are three classes separated with spaces. If you need to identify an element by multiple classes, use a selector like this</p>
<pre><code>tags = soup.select("div.sc-16r8icm-0.sc-1teo54s-1.dNOTPP")
</code></pre> | Extract Name Text from nested table in python using Beautiful Soup | python|html|web-scraping|beautifulsoup | 0 | 46 | 2 | 72,280,200 | 72,280,200 | 0 | true | 2022-05-17T20:06:52.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract Name Text from nested table in python using Beautiful Soup<p>I am relatively new to web scraping using Python, and I am having a lot of difficulty pu... |
72,318,528 | How do i do this using the while loop?<pre><code>l1 = ["Harry", "Soham", "Sam", "Rahul"]
for name in l1:
if name.startswith("S"):
print("Hello " + name + "!")
</code></pre>
<p>How do I do this using the while loop??
(name. , starts , ... | <pre><code>x=0
l1 = ["Harry", "Soham", "Sam", "Rahul"]
while x<len(l1):
if l1[x].startswith("S"):
print("Hello " + l1[x] + "!")
x+=1
</code></pre> | How do i do this using the while loop? | python|python-3.x | 0 | 46 | 2 | 72,318,639 | 72,318,639 | 0 | true | 2022-05-20T11:53:49.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do i do this using the while loop?<pre><code>l1 = ["Harry", "Soham", "Sam", "Rahul"]
for name in l1:
if name... |
72,291,522 | Program that converts from roman to arabic numerals always gives Invalid Argument<p>I have this program that tries to convert from Roman numerals to Arabic numerals and compiles
without problems, but even if I enter a valid number, it always comes out by default saying
Invalid argument.</p>
<pre><code>#include <coni... | <p>You don't specify the input, but I presume you're using the character 'n' to terminate the roman numeral.</p>
<p>However, the loop check:</p>
<p><code>while ((letraR != 'n') && (cont < 15)) {</code></p>
<p>and the switch case:</p>
<p><code>case 'n': break;</code></p>
<p>will never match because you've a... | Program that converts from roman to arabic numerals always gives Invalid Argument | arrays|c | 0 | 46 | 1 | 72,291,661 | 72,291,661 | 0 | true | 2022-05-18T14:57:20.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Program that converts from roman to arabic numerals always gives Invalid Argument<p>I have this program that tries to convert from Roman numerals to Arabic n... |
72,248,232 | Use output of a CURL and fail if the output contains ERROR<p>I am using this below CURL statement:</p>
<pre><code>curl -u $SONAR_TOKEN: https://$SONAR_SERVER/api/qualitygates/project_status?projectKey=$SONAR_PROJECT_KEY\&pullRequest=$SONAR_PR_KEY
</code></pre>
<p>Output:
<a href="https://i.stack.imgur.com/nmcsh.png... | <p>Without <code>jq</code> this should to the trick:</p>
<pre><code>quality_gatesstatus=$(curl -u $SONAR_TOKEN: https://$SONAR_SERVER/api/qualitygates/project_status?projectKey=$SONAR_PROJECT_KEY\&pullRequest=$SONAR_PR_KEY)
echo "$quality_gatesstatus" | grep '"status":"ERROR"' > /de... | Use output of a CURL and fail if the output contains ERROR | bash|shell|quality-gate | 0 | 46 | 1 | 72,249,358 | 72,249,358 | 0 | true | 2022-05-15T12:24:46.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use output of a CURL and fail if the output contains ERROR<p>I am using this below CURL statement:</p>
<pre><code>curl -u $SONAR_TOKEN: https://$SONAR_SERVER... |
72,392,742 | How can I count the same values in the array and create a different array?<pre><code>[{
"project_name": "test",
"status": "High"
},{
"project_name": "test",
"status": "Critical"
},{
"project_name": "test&... | <ol>
<li>Create a temporary object to hold the updated information.</li>
<li>Loop over the array, and for each object create a bespoke key from the <code>product_name</code> and the <code>status</code>.</li>
<li>If the key doesn't exist on the temporary object create a new object from the current one, and add a value p... | How can I count the same values in the array and create a different array? | javascript|arrays|json|object | 1 | 46 | 1 | 72,393,127 | 72,393,127 | 0 | true | 2022-05-26T13:37:37.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I count the same values in the array and create a different array?<pre><code>[{
"project_name": "test",
"status&quo... |
72,400,085 | Runtime error is coming while solving the question<ol start="187">
<li>Repeated DNA Sequences
<a href="https://leetcode.com/problems/repeated-dna-sequences/" rel="nofollow noreferrer">https://leetcode.com/problems/repeated-dna-sequences/</a></li>
</ol>
<p>I am solving this question on Leetcode and I am stuck on some si... | <p>Your issue is this line <code>if(j-i+1<k)j++;</code></p>
<p>Consider the following code:</p>
<pre><code>int j=0;
int k=10;
while(j<s.length()){
if(j-i+1<k)
j++;
</code></pre>
<p>The above code will always cause the value of <code>j</code> inside your while loop to increment and start at 1 (not 0... | Runtime error is coming while solving the question | java | 1 | 46 | 1 | 72,400,744 | 72,400,744 | 0 | true | 2022-05-27T03:17:46.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Runtime error is coming while solving the question<ol start="187">
<li>Repeated DNA Sequences
<a href="https://leetcode.com/problems/repeated-dna-sequences/"... |
72,383,927 | Does WaitHandle.WaitOne() include time hibernated/sleeping?<p>In .NET, does <code>WaitHandle.WaitOne(int millisecondsTimeout)</code> (and presumably methods that block with timeouts, such as <code>Thread.Sleep()</code>) include time that the computer is hibernating or sleeping? For example, if I call <code>WaitHandle.... | <p>Since Windows 7, <code>kernel32.dll</code> has a <a href="https://docs.microsoft.com/en-us/windows/win32/api/realtimeapiset/nf-realtimeapiset-queryunbiasedinterrupttime" rel="nofollow noreferrer"><code>QueryUnbiasedInterruptTime</code> function</a>.</p>
<blockquote>
<p>The unbiased interrupt-time count does not incl... | Does WaitHandle.WaitOne() include time hibernated/sleeping? | c#|.net|windows|multithreading|mutex | 3 | 46 | 1 | 72,384,642 | 72,384,642 | 0 | true | 2022-05-25T20:41:29.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does WaitHandle.WaitOne() include time hibernated/sleeping?<p>In .NET, does <code>WaitHandle.WaitOne(int millisecondsTimeout)</code> (and presumably methods ... |
72,246,564 | data sequence handing<p>I am stuck with a weird problem of handling data sequences.
My source data looks like -</p>
<pre><code>Roll-on, Marker
1,1
2,0
3,0
5,1
8,1
9,0
10,1
</code></pre>
<p>the marker column can only have two values, 1 and 0</p>
<p>if the roll no column is in a sequence, the marker value of... | <pre><code>SELECT
CASE WHEN a=2 AND CHARINDEX('-',R)=0 THEN CONCAT(R,'-',R) ELSE R END as R,
R2,
a
FROM (
SELECT
1 as a,
CONVERT(VARCHAR(3), Roll) R,
Roll as R2
FROM table1
UNION ALL
SELECT
2,
STRING_AGG(Roll,'-') R,
MAX(Roll) as R2
FROM (
S... | data sequence handing | sql-server | 0 | 46 | 2 | 72,246,824 | 72,246,824 | 1 | true | 2022-05-15T08:09:22.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
data sequence handing<p>I am stuck with a weird problem of handling data sequences.
My source data looks like -</p>
<pre><code>Roll-on, Marker
1,1
2,0
... |
72,246,757 | How to predict MNIST data with trained model (expected axis -1 of input shape to have value 784, but received input with shape (784, 1))<p>I have followed the tensorflow2 tutorial but now want to use the model to predict an image.</p>
<p>My code:</p>
<pre><code>import tensorflow
import tensorflow_datasets
import matplo... | <p>Check the shape of <code>images[0].squeeze().flatten()</code>:</p>
<pre><code>import numpy as np
print(np.shape(images[0].squeeze().flatten()))
</code></pre>
<pre><code>(784,)
</code></pre>
<p>Your input is however <code>(None, 28, 28)</code>. So, you don't need the flatten (that is taken care of by the <code>Flatt... | How to predict MNIST data with trained model (expected axis -1 of input shape to have value 784, but received input with shape (784, 1)) | python|tensorflow | 0 | 46 | 1 | 72,246,957 | 72,246,957 | 1 | true | 2022-05-15T08:42:09.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to predict MNIST data with trained model (expected axis -1 of input shape to have value 784, but received input with shape (784, 1))<p>I have followed th... |
72,247,945 | send a message to slack using curl in a lua script<p>I get an error with this script when trying to send a message to slack using curl in LUA.
Thanks for your help.</p>
<pre><code>cmd="c:\\curl\\bin\\curl.exe -X POST -H "Content-type: application/json" -d "{\"text\":\"Hello\"}&qu... | <p>Your script is full of syntax errors because you didn't bother to escape the double quotes enclosing the arguments of your cURL command. The simplest solution is to just use long strings here, which don't require you to escape double quotes <em>while</em> not interpreting <code>\"</code> as <code>"</code>,... | send a message to slack using curl in a lua script | curl|lua | 0 | 46 | 1 | 72,248,521 | 72,248,521 | 1 | true | 2022-05-15T11:44:17.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
send a message to slack using curl in a lua script<p>I get an error with this script when trying to send a message to slack using curl in LUA.
Thanks for you... |
72,252,313 | Single vector multiple times in 2d array<p>This is my code:</p>
<pre><code>b = [6 * [1, 3, 4, 2],
4 * [2, 1, 4, 3],
3 * [3, 4, 2, 1],
4 * [4, 2, 1, 3],
4 * [4, 3, 2, 1],
]
</code></pre>
<p>Which returns an array which has 6X4=24 elements in the first line 4X4=16 in the second etc...</p>
<p>What i want to achieve i... | <p>You can also put it in one line with</p>
<pre><code>b = 6*[[1, 3, 4, 2]] + 4*[[2, 1, 4, 3]] + 3*[[3, 4, 2, 1]] + 4*[[4, 2, 1, 3]] + 4* [[4, 3, 2, 1]])
print(b)
</code></pre> | Single vector multiple times in 2d array | python|arrays|python-3.6 | 1 | 46 | 5 | 72,252,393 | 72,252,393 | 1 | true | 2022-05-15T21:28:31.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Single vector multiple times in 2d array<p>This is my code:</p>
<pre><code>b = [6 * [1, 3, 4, 2],
4 * [2, 1, 4, 3],
3 * [3, 4, 2, 1],
4 * [4, 2, 1, 3],
4... |
72,252,724 | How to let user copy CSS ::before content?<p>Text inserted via <code>::before</code> and <code>::after</code> cannot be selected and not copied.</p>
<p>How can I change this?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snipp... | <p>a function taking an element and returning the ::before text.</p>
<pre><code>function getPseudoElementContent(selector){
return window.getComputedStyle(
selector, ':after'
);
}
</code></pre>
<p>a function taking an element and sitting its :: before text to display:none
<code>enter code here</code></... | How to let user copy CSS ::before content? | javascript|html|css | -1 | 46 | 1 | 72,252,825 | 72,252,825 | 1 | true | 2022-05-15T22:54:15.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to let user copy CSS ::before content?<p>Text inserted via <code>::before</code> and <code>::after</code> cannot be selected and not copied.</p>
<p>How c... |
72,253,401 | How to populate one of the HTML Table columns with pre-set options using Apps Script?<p>I am trying to get this table to display the options for each of the table rows, but I can't quite get it:</p>
<p>I suppose I'd set it in the seconf <code>for loop</code>, but I'm new to <code>html</code> and can't move forward.</p>... | <p>I believe your goal is as follows.</p>
<ul>
<li>You want to put the dropdown list in the column "Approval".</li>
</ul>
<p>In this case, how about the following modification?</p>
<h3>Modified script:</h3>
<p>Please modify the function <code>createTable</code> as follows.</p>
<pre class="lang-js prettyprint-... | How to populate one of the HTML Table columns with pre-set options using Apps Script? | javascript|html|google-apps-script | 2 | 46 | 1 | 72,253,466 | 72,253,466 | 1 | true | 2022-05-16T01:36:58.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to populate one of the HTML Table columns with pre-set options using Apps Script?<p>I am trying to get this table to display the options for each of the ... |
72,254,548 | how to input text parameter to GET api with space<p>I have an http service to GET movies api data it works fine but if i input 2 words for example
"The Batman" it's not working because it will return null but if i only input 1 word "Batman" it works fine, im still new with query query things</p>
<p>... | <p>you can try this way.</p>
<pre><code> String query ='The Batman';
await get(Uri.parse('https://api.themoviedb.org/3/search/movie').replace(
queryParameters: {
'api_key' :'key',
'query' : query
}
));
</code></pre> | how to input text parameter to GET api with space | flutter|dart | 0 | 46 | 1 | 72,254,587 | 72,254,587 | 1 | true | 2022-05-16T05:36:18.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to input text parameter to GET api with space<p>I have an http service to GET movies api data it works fine but if i input 2 words for example
"The ... |
72,255,108 | How to check used language percentage in Android Studio project<p>When we upload a project on GitHub it tells us the percentage of language used in that project. Is there any other option to check that?</p> | <ol>
<li><p>If you could use VS Code, you could try <a href="https://marketplace.visualstudio.com/items?itemName=uctakeoff.vscode-counter" rel="nofollow noreferrer">VS Code Counter</a></p>
</li>
<li><p>A free tool <a href="https://dwheeler.com/sloccount/" rel="nofollow noreferrer">SLOCCount</a></p>
</li>
</ol> | How to check used language percentage in Android Studio project | android|android-studio|apk | 0 | 46 | 1 | 72,255,169 | 72,255,169 | 1 | true | 2022-05-16T06:49:26.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check used language percentage in Android Studio project<p>When we upload a project on GitHub it tells us the percentage of language used in that proj... |
72,260,360 | Compare two columns from two dataframes and delete rows in one if values are equal<p>I have two pandas dataframes:</p>
<pre><code>df1:
... id ...
0 123
1 231
2 321
df2:
... id ...
4 122
13 231
75 323
</code></pre>
<p>I need to loop over <code>id</code> column in <code>df2</code> and if v... | <p>You can check <code>isin</code></p>
<pre><code>out = df1[~df1['id'].isin(df2['id'])]
</code></pre> | Compare two columns from two dataframes and delete rows in one if values are equal | python|pandas|dataframe | 0 | 46 | 1 | 72,260,394 | 72,260,394 | 1 | true | 2022-05-16T13:54:10.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Compare two columns from two dataframes and delete rows in one if values are equal<p>I have two pandas dataframes:</p>
<pre><code>df1:
... id ...
0 1... |
72,261,656 | How to find and calculate common letters between words in pandas<p>I have a dataset with some words in it and I want to compare 2 columns and count common letters between them.</p>
<p>For e.g I have:</p>
<pre><code>data = {'Col_1' : ['Heaven', 'Jako', 'Sm', 'apizza'],
'Col_2' : ['Heaven', 'Jakob', 'Smart', 'pizz... | <p>You can use a list comprehension with help of <a href="https://docs.python.org/3/library/itertools.html#itertools.takewhile" rel="nofollow noreferrer"><code>itertools.takewhile</code></a>:</p>
<pre><code>from itertools import takewhile
df['Match'] = [[x for x,y in takewhile(lambda x: x[0]==x[1], zip(a,b))]
... | How to find and calculate common letters between words in pandas | python|pandas | 0 | 46 | 2 | 72,261,771 | 72,261,771 | 1 | true | 2022-05-16T15:23:49.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find and calculate common letters between words in pandas<p>I have a dataset with some words in it and I want to compare 2 columns and count common le... |
72,267,691 | data.table update by reference for different columns<p>I tried to sets columns <code>trtxxp</code> and <code>trtxxa</code> as NA, when the <code>sdx</code> is NA.</p>
<p>dummy data:</p>
<pre><code>library(data.table)
dt <- data.table(sd1 = c(1:3, NA, 4:5, NA, 6:10, NA, NA),
sd2 = c(1:5, NA, 6:7, NA,... | <p>I think MichaelChirico's suggest of a <code>for</code> loop may look like this:</p>
<pre class="lang-r prettyprint-override"><code>cols <- list(sd1=c("trt01p", "trt01a"), sd2=c("trt02a", "trt02p"))
for (col in names(cols)) set(dt, which(is.na(dt[[col]])), cols[[col]], value... | data.table update by reference for different columns | r|dataframe|data.table | 1 | 46 | 1 | 72,268,118 | 72,268,118 | 1 | true | 2022-05-17T02:55:42.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
data.table update by reference for different columns<p>I tried to sets columns <code>trtxxp</code> and <code>trtxxa</code> as NA, when the <code>sdx</code> i... |
72,265,100 | MiniZinc: Constraint for sum over two array indexes 'k','j' for all index 'i' in 3dArray creates TypeError<p>As the code below hopefully explains, I want to implement a constraint where for each 'i', the sum over all 'j' and 'k' for that specific 'i' in ARRAY[k,i,j] must be less than or equal to 1.</p>
<pre><code>const... | <p>The error is thrown since the condition (<code><=</code>) is placed in the wrong place. It should be outside the body of <code>sum</code>:</p>
<pre><code>constraint forall(i in 1..10)( sum(j in 1..10, k in 1..10)(ARRAY[k,i,j]) <= )
</code></pre> | MiniZinc: Constraint for sum over two array indexes 'k','j' for all index 'i' in 3dArray creates TypeError | arrays|syntax|minizinc | 1 | 46 | 1 | 72,268,628 | 72,268,628 | 1 | true | 2022-05-16T20:15:11.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MiniZinc: Constraint for sum over two array indexes 'k','j' for all index 'i' in 3dArray creates TypeError<p>As the code below hopefully explains, I want to ... |
72,268,555 | Not able to see anything written inside the return component in JSX<p>I'm new to React and JSX. I'm building a button when clicked opens a dialog box with a table inside it (1x3) which has name, status, & exception error as "strings".</p>
<p>For some reason, when I click the button, I can see the console.... | <p>You can't use return method inside a onClick function.
You might need to maintain a separate state to handle the onclick function.</p>
<pre><code>const steps = testCase["test-method"];
return (
<>
<TableRow key={key} style={{ cursor: "pointer" }} onClick={()
... | Not able to see anything written inside the return component in JSX | javascript|reactjs|next.js|jsx | 1 | 46 | 1 | 72,268,719 | 72,268,719 | 1 | true | 2022-05-17T05:23:27.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not able to see anything written inside the return component in JSX<p>I'm new to React and JSX. I'm building a button when clicked opens a dialog box with a ... |
72,269,579 | How to render specific template if two app have same template name?<p>How can I render a specific template in Django? I have created three apps for my project. Each app contains a templates folder. The project structure is as follows:</p>
<pre><code>├───Project
├───app1
│ ├───templates
├───app2
│ ├───templates
├───... | <p>The general recommendation is to use a folder structure like app1/templates/app1/ in order to avoid such kind of collisions. Same for static files.</p>
<p>See also <a href="https://docs.djangoproject.com/en/4.0/intro/tutorial03" rel="nofollow noreferrer">docs.djangoproject.com/en/4.0/intro/tutorial03</a> and search ... | How to render specific template if two app have same template name? | django|django-templates | 0 | 46 | 1 | 72,271,017 | 72,271,017 | 1 | true | 2022-05-17T07:10:07.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to render specific template if two app have same template name?<p>How can I render a specific template in Django? I have created three apps for my projec... |
72,273,219 | Romove outliers from stat_summary in ggplot2<p>I have this part of code to produce boxplot with my data:</p>
<pre><code>p <- ggplot(meltData, aes(x=variable, y=value)) +
geom_boxplot()+ geom_boxplot(outlier.colour="red", outlier.shape=1,outlier.size=2)+
stat_summary(geom="text", fun=quantile,... | <p>If I understand your purpose correctly, you want to create boxplots along with texts that show the upper and lower whisker numbers and no outliers should be shown in the plots. If that's true, then I agree with @Death Metal that you might want to filter the outliers per category.</p>
<p>However, because you don't p... | Romove outliers from stat_summary in ggplot2 | r|ggplot2|boxplot|outliers | 1 | 46 | 1 | 72,275,927 | 72,275,927 | 1 | true | 2022-05-17T11:26:59.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Romove outliers from stat_summary in ggplot2<p>I have this part of code to produce boxplot with my data:</p>
<pre><code>p <- ggplot(meltData, aes(x=variab... |
72,281,493 | Python add dashes to your characters in a string?<p>I have a string that i want to modify.</p>
<p>The string is something like 0rty4653 and i want to convert it into this format :-</p>
<p>0--r--t--y--4--6--5--3-- or in other words make it look into the following format --[CHAR]--.</p>
<p>The string could be dynamic.</p... | <pre><code>final = ""
for i in my_list:
final += i+"--"
</code></pre>
<p>iterating over the list should allow you to concat each element and -- to create that product</p> | Python add dashes to your characters in a string? | python | 0 | 46 | 1 | 72,281,524 | 72,281,524 | 1 | true | 2022-05-17T22:52:32.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python add dashes to your characters in a string?<p>I have a string that i want to modify.</p>
<p>The string is something like 0rty4653 and i want to convert... |
72,283,623 | Conversion failed when converting the varchar/nvarchar value to data type int<pre><code>SELECT CONVERT([int],11.25)-CONVERT([int],'10.25')
</code></pre>
<p>How to avoid error and return 1 as result.</p>
<p>This is not a duplicate question. The similar question you referred is complex when comparing to my simple query ... | <p>Rather than using the implicit behaviour of the <code>CONVERT</code> function, why not use the correct function, e.g. <code>ROUND</code></p>
<pre><code>SELECT ROUND(11.25, 0)-ROUND(CONVERT(DECIMAL(9,2),'10.25'), 0)
</code></pre> | Conversion failed when converting the varchar/nvarchar value to data type int | sql|sql-server | -2 | 46 | 1 | 72,283,740 | 72,283,740 | 1 | true | 2022-05-18T05:28:57.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conversion failed when converting the varchar/nvarchar value to data type int<pre><code>SELECT CONVERT([int],11.25)-CONVERT([int],'10.25')
</code></pre>
<p>H... |
72,286,326 | Pandas - Remove part of string in column that is already in another column<p>I have this dataframe :</p>
<pre><code>dfA = pd.DataFrame({
'A': ['abc','ghi','mno', 'stu'],
'B': ['abcdef', 'jklghi', 'mnopqr', 'vwxstu']
})
dfA
</code></pre>
<p>And I want to get this dataframe :</p>
<pre><co... | <p>You need to loop here.</p>
<p>You can use <code>re.sub</code>:</p>
<pre><code>import re
dfA['C'] = [re.sub(a, '', b) for a,b in zip(dfA['A'], dfA['B'])]
</code></pre>
<p>or <code>str.replace</code>:</p>
<pre><code>dfA['C'] = [b.replace(a, '') for a,b in zip(dfA['A'], dfA['B'])]
</code></pre>
<p>output:</p>
<pre><co... | Pandas - Remove part of string in column that is already in another column | python|pandas|string|dataframe | 1 | 46 | 1 | 72,286,375 | 72,286,375 | 1 | true | 2022-05-18T09:13:19.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas - Remove part of string in column that is already in another column<p>I have this dataframe :</p>
<pre><code>dfA = pd.DataFrame({
'A': ['a... |
72,286,572 | Python: how to save text + element from the list to the txt file<p>I'm learning Python and I'm trying to combine saving text + specific element from the list to a txt file.</p>
<p>I managed to get the text out and it looks like this:</p>
<p>Project name:
Main worker:
Project name:
Main worker:</p>
<p>and this is fine b... | <p>If I understood you correctly, just writing the names and projects like you did with the headers (e.g. "Project name:") would be sufficient. For example:</p>
<pre><code>file.write("Project name: \n")
file.write(projects[0] + "\n")
file.write("Main worker: \n")
file.write(worke... | Python: how to save text + element from the list to the txt file | python|list|text|txt | 1 | 46 | 2 | 72,286,697 | 72,286,697 | 1 | true | 2022-05-18T09:29:43.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python: how to save text + element from the list to the txt file<p>I'm learning Python and I'm trying to combine saving text + specific element from the list... |
72,287,649 | Pandas fillna with np.select<p>I have the dataframe ('data') which looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>index</th>
<th>competitor</th>
<th>region</th>
<th>sku</th>
<th>date</th>
<th>price</th>
</tr>
</thead>
<tbody>
<tr>
<td>000</td>
<td>A</td>
<td>M</td>
<td>01<... | <p>IIUC use <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.groupby.DataFrameGroupBy.transform.html" rel="nofollow noreferrer"><code>GroupBy.transform</code></a> with lambda function for forward and back filling missing values, if not exist non missing value per groups are returned <code... | Pandas fillna with np.select | pandas|numpy|fillna | 1 | 46 | 1 | 72,287,775 | 72,287,775 | 1 | true | 2022-05-18T10:40:53.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas fillna with np.select<p>I have the dataframe ('data') which looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
... |
72,285,248 | Logitech LED Illumination SDK Permanent Color change<p>I have a simple console application that mutes the microphone. I'd like to change the color of a single key when this application runs once. Once it ran and the microphone is muted, color of the key changes. Once it ran again, and the microphone is unmuted, color i... | <p>Logitech LED SDK keeps your changes while the library is connected (between <code>LogiLedInit</code> and <code>LogiLedShutdown</code>).<br />
So, you must keep your application running to persist the color of the key.<br />
You may create a window-less application for this purpose. Or a console application may keep... | Logitech LED Illumination SDK Permanent Color change | c#|logitech|logitech-gaming-software|logitech-led-illumination-sdk | 1 | 46 | 1 | 72,288,841 | 72,288,841 | 1 | true | 2022-05-18T07:57:09.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Logitech LED Illumination SDK Permanent Color change<p>I have a simple console application that mutes the microphone. I'd like to change the color of a singl... |
72,292,508 | How do I change the order of a container in mobile with this code?<p>How do I change the order of this code in mobile?</p>
<p>Currently on desktop <code><div class="grid4-12"></code>(left) and <code><div class="grid8-12"></code>(right) are stacked to each other.<br />
How do I change the... | <p>You can give the parent class (.card-content-lg) a display value of flex, with flex-direction set to column. Then, on the "second" / "right" element, give it a value of "order: -1;". Then, change the value of flex-direction to "row" on larger viewports, and change the order ba... | How do I change the order of a container in mobile with this code? | html|css | 0 | 46 | 2 | 72,292,779 | 72,292,779 | 1 | true | 2022-05-18T16:03:06.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I change the order of a container in mobile with this code?<p>How do I change the order of this code in mobile?</p>
<p>Currently on desktop <code><... |
72,301,870 | Prevent a message to be polled more than once using Spring Integration?<p>I`m using Spring Integration and <strong>JpaPollingChannelAdapter</strong> to poll entried with a certain state from a database. If there are entries found, those are then processed.</p>
<p>I wonder if there is any way to prevent an entry to be p... | <p>The <code>JpaExecutor</code> comes with an option like <code>deleteAfterPoll</code>:</p>
<p><a href="https://docs.spring.io/spring-integration/docs/current/reference/html/jpa.html#jpa-inbound-channel-adapter" rel="nofollow noreferrer">https://docs.spring.io/spring-integration/docs/current/reference/html/jpa.html#jpa... | Prevent a message to be polled more than once using Spring Integration? | java|spring-integration | 0 | 46 | 1 | 72,306,524 | 72,306,524 | 1 | true | 2022-05-19T09:18:58.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prevent a message to be polled more than once using Spring Integration?<p>I`m using Spring Integration and <strong>JpaPollingChannelAdapter</strong> to poll ... |
72,306,502 | CSS Flexbox - Align the contents on top and align the button to bottom<p>I'm trying to modify an existing component which inherits the <strong>Flexbox concept</strong>.</p>
<p>Currently it looks like this:
<a href="https://i.stack.imgur.com/92KTo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/92KTo.... | <p>Check this, I hope I understood what you want to achieve <a href="https://codepen.io/IvanBisultanov/pen/PoQmXqX" rel="nofollow noreferrer">https://codepen.io/IvanBisultanov/pen/PoQmXqX</a></p>
<p>I also added .btn-wrap classname, and wrapped all HTML above in div</p>
<pre><code>.counsellor-list-item-content {
flex... | CSS Flexbox - Align the contents on top and align the button to bottom | css|flexbox | 0 | 46 | 1 | 72,306,645 | 72,306,645 | 1 | true | 2022-05-19T14:35:33.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS Flexbox - Align the contents on top and align the button to bottom<p>I'm trying to modify an existing component which inherits the <strong>Flexbox concep... |
72,297,285 | Fix intellisense to provide correct completion list on sub property used within function overloads<p>I am trying to create an overload to a generic function where the return type of a function is determined by the value of a property on the object provided as "props" to the function. The function has a requi... | <p>It looks like you've run into a missing feature of TypeScript, reported at <a href="https://github.com/microsoft/TypeScript/issues/44183" rel="nofollow noreferrer">microsoft/TypeScript#44183</a>. TypeScript seems to choose just one of the overloads from which to show potential completions. You could give that issu... | Fix intellisense to provide correct completion list on sub property used within function overloads | typescript|generics|typescript-generics | 1 | 46 | 1 | 72,309,674 | 72,309,674 | 1 | true | 2022-05-19T00:13:40.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fix intellisense to provide correct completion list on sub property used within function overloads<p>I am trying to create an overload to a generic function ... |
72,310,299 | Why does VSCode constantly mess up my Flutter code with weird identation?<p>When I save my Dart files in VSCode, it often messes their identation in weird ways, Now, I already remember it creating new lines when coding in JS, but at least that was unnoticable. But here? It looks this:</p>
<pre class="lang-dart prettypr... | <h3>Answer</h3>
<p>It's the trailing commas and the 80 column size.
In Dart, you don't have a problem if you put a trailing comma, in fact, in Flutter this is suggested that you do to fix these indentation issues.
How your code would be:</p>
<pre class="lang-dart prettyprint-override"><code>Widget build(BuildContext co... | Why does VSCode constantly mess up my Flutter code with weird identation? | flutter|visual-studio-code | 0 | 46 | 1 | 72,310,363 | 72,310,363 | 1 | true | 2022-05-19T19:44:58.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does VSCode constantly mess up my Flutter code with weird identation?<p>When I save my Dart files in VSCode, it often messes their identation in weird wa... |
72,312,101 | Appending values to a tuple<p>This code appends a new value directly to a tuple. But, tuples are supposed to be nonchangeable. Could someone explain what is happening here?</p>
<pre><code>word_frequency = [('hello', 1), ('my', 1), ('name', 2),
('is', 1), ('what', 1), ('?', 1)]
def frequency_to_words(word_frequency):
... | <p>This line makes a list []</p>
<pre class="lang-py prettyprint-override"><code>frequency2words[frequency] = [word]
</code></pre>
<p>That's what you are .append()'ing to.</p>
<p>But you can do <code>(1,2) + (3,4)</code> and Python will make a bigger tuple to hold four things and copy them in, to make it look like it w... | Appending values to a tuple | python|python-3.x|tuples | 0 | 46 | 2 | 72,312,124 | 72,312,124 | 1 | true | 2022-05-19T23:33:57.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Appending values to a tuple<p>This code appends a new value directly to a tuple. But, tuples are supposed to be nonchangeable. Could someone explain what is ... |
72,317,176 | NPM Install without CD the folder<p>I'm using Windows Powershell and a pipeline in order to create the package of the application that I must deploy.</p>
<p>This is my pipeline:
<a href="https://i.stack.imgur.com/am2iR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/am2iR.png" alt="enter image descri... | <p>Try running</p>
<pre><code>npm install --prefix C:\MyPath\Application\ClientApp
</code></pre> | NPM Install without CD the folder | angular|powershell|npm|gitlab|gitlab-ci | 0 | 46 | 1 | 72,317,390 | 72,317,390 | 1 | true | 2022-05-20T10:12:43.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NPM Install without CD the folder<p>I'm using Windows Powershell and a pipeline in order to create the package of the application that I must deploy.</p>
<p>... |
72,317,975 | How to calculate numbers of days between two dates and subtract weekends DJANGO MODELS<p>hope you're all fine!</p>
<p>I have a model called <code>Vacation</code> and I'm struggling with one field: <code>days_requested</code>, this field is the number days from <code>vacation_start</code> and <code>vacation_end</code>, ... | <p>UPDATE</p>
<pre><code>
class Model:
days_requested = models.IntegerField(blank=True,null=True)
def save(self, *args, **kwargs):
excluded = (6, 7)
days = 0
start_date =self.vacation_start
while start_date < self.vacation_end:
if start_date.isoweekday(... | How to calculate numbers of days between two dates and subtract weekends DJANGO MODELS | django|django-models | 1 | 46 | 2 | 72,318,121 | 72,318,121 | 1 | true | 2022-05-20T11:10:21.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to calculate numbers of days between two dates and subtract weekends DJANGO MODELS<p>hope you're all fine!</p>
<p>I have a model called <code>Vacation</c... |
72,319,129 | Join tables and create combinations in python<p>In advance: Sorry, the title is a bit fuzzy</p>
<p>PYTHON</p>
<p>I have two tables. In one there are unique names for example 'A', 'B', 'C' and in the other table there is a Time series with months example 10/2021, 11/2021, 12/2021. I want to join the tables now that I ha... | <p>from <a href="https://stackoverflow.com/questions/13269890/cartesian-product-in-pandas">cartesian product in pandas</a></p>
<pre><code>df1 = pd.DataFrame([1, 2, 3], columns=['A'])
df2 = pd.DataFrame(["a", "b", "c"], columns=['B'])
df = (df1.assign(key=1)
.merge(df2.assign(key=... | Join tables and create combinations in python | python|pandas | 0 | 46 | 2 | 72,320,242 | 72,320,242 | 1 | true | 2022-05-20T12:42:33.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Join tables and create combinations in python<p>In advance: Sorry, the title is a bit fuzzy</p>
<p>PYTHON</p>
<p>I have two tables. In one there are unique n... |
72,317,034 | Adding least squares and LMS lines to a plot<p>I have loaded the data set <code>Animals2</code> from the package <code>library (robustbase)</code>, and I am interested on working with the logarithm of these data.</p>
<pre><code>library(robustbase)
x<-log(Animals2)
plot(x, main="Plot Animals2", col="da... | <p>Assuming that <code>mblm()</code> does the Siegel model, you could use this:</p>
<pre class="lang-r prettyprint-override"><code> library(robustbase)
library(mblm)
data(Animals2)
x <- log(Animals2)
plot(x, main="Plot Animals2", col="darkgreen")
abline(lm(brain ~ body, data=x), col=&q... | Adding least squares and LMS lines to a plot | r|3d|2d|least-squares|lms | 1 | 46 | 1 | 72,321,048 | 72,321,048 | 1 | true | 2022-05-20T10:01:41.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding least squares and LMS lines to a plot<p>I have loaded the data set <code>Animals2</code> from the package <code>library (robustbase)</code>, and I am ... |
72,320,968 | VBA loop through rows, select a couple of them & then delete them<p>I have a dataset, in which i want to delete every x row of it (x = userinput).
If i delete the rows immediately, the endresult will be incorrect because the row order changes with every deletion.
I wrote this code so far:</p>
<pre><code>Sub Delete_Data... | <p>Using a union your code would look like this:</p>
<pre><code>Sub Delete_Data()
'Take userinput
Dim userInput As Variant
Dim i As Long
Do While True
userInput = InputBox("please enter a number between 2-100", _
"Lets delete some data XD")
If IsNumeric(userIn... | VBA loop through rows, select a couple of them & then delete them | vba|for-loop | 0 | 46 | 2 | 72,321,512 | 72,321,512 | 1 | true | 2022-05-20T14:52:51.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA loop through rows, select a couple of them & then delete them<p>I have a dataset, in which i want to delete every x row of it (x = userinput).
If i delet... |
72,310,308 | Why does the backspace key print ^? when calling gets() in crystal?<p>When I try to correct input for my crystal program (in a zsh terminal on my Mac), a ^? character is printed to the screen for each press of backspace. It's disorienting and does not delete any characters from the screen, but it technically functions ... | <p>I think, it will depend on the terminal that you are using and it is largely independent of the programming language (e.g. it has been <a href="https://stackoverflow.com/q/8976452/783510">reported in Python</a>).</p>
<p>Some terminals send <code>^H</code> or <code>^?</code> when you type a backslash. I can also repr... | Why does the backspace key print ^? when calling gets() in crystal? | crystal-lang | 1 | 46 | 1 | 72,321,583 | 72,321,583 | 1 | true | 2022-05-19T19:46:18.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does the backspace key print ^? when calling gets() in crystal?<p>When I try to correct input for my crystal program (in a zsh terminal on my Mac), a ^? ... |
72,325,138 | How can I flatten a multi-dimensional CSV file using pandas?<p>I have a CSV that has two dimensions that I'm reading into pandas</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
# pretend I'm reading in a CSV here- I'm just dumping some of the data in directly so it's easier to follow here
colum... | <p>You can use <code>melt</code> and then <code>pivot</code>:</p>
<pre><code>df = df.melt(id_vars=['tract_id', 'age_group'])
df = (df.assign(col_names=df['age_group'] + '_' + df['variable'])
.pivot(index='tract_id',columns='col_names', values='value'))
df
Out[1]:
col_names 1-4_e(x) 1-4_l(x) 1-4_nq(x) 15-24_e(x) ... | How can I flatten a multi-dimensional CSV file using pandas? | python|pandas|dataframe | 1 | 46 | 1 | 72,325,278 | 72,325,278 | 1 | true | 2022-05-20T21:58:18.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I flatten a multi-dimensional CSV file using pandas?<p>I have a CSV that has two dimensions that I'm reading into pandas</p>
<pre class="lang-py pret... |
72,326,276 | about kubernet configmap mountPath with subPath<p>The pod yaml</p>
<pre><code> containers:
- name: kiada
image: :kiada-0.1
volumeMounts:
- name: my-test
subPath: my-app.conf
mountPath: /html/my-app.conf
volumes:
- name: m... | <p>In order to produce a file called <code>my-app.config</code> containing your application config in your Pod's file system, would have to ensure that this file <strong>exists in your config map</strong>:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: kiada-config
data:
my-app.conf: |
key: value... | about kubernet configmap mountPath with subPath | kubernetes | 0 | 46 | 2 | 72,327,498 | 72,327,498 | 1 | true | 2022-05-21T02:37:45.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
about kubernet configmap mountPath with subPath<p>The pod yaml</p>
<pre><code> containers:
- name: kiada
image: :kiada-0.1
v... |
72,324,390 | List dependencies that do not have wheel<p>I am on a project where some libraries are pretty old, and I won't upgrade them in order to avoid recompiling with a C/C++ compiler</p>
<p>Is there some way to verify or check which dependencies there is no pre-built wheel?</p>
<p>Let me explain better: I have a project with s... | <p>I think you could attempt to run</p>
<pre><code>pip install --only-binary=:all: -r requirements.txt
</code></pre>
<p>in the target platform and see what versions get resolved or what fails with a "No matching distribution found".</p>
<p>Beware that if you run into a pure python project that didn't publish... | List dependencies that do not have wheel | python|pip|python-poetry | 0 | 46 | 1 | 72,328,717 | 72,328,717 | 1 | true | 2022-05-20T20:15:13.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
List dependencies that do not have wheel<p>I am on a project where some libraries are pretty old, and I won't upgrade them in order to avoid recompiling with... |
72,329,889 | Python Altair how do I skip (or squeeze) part of the x axis?<p>Say I have data indexed by date time (<code>pd.Timestamp</code> type), but I know for certain that between certain times each day, there is no data (financial data for example), and I would like to plot data over several days but I want to skip the night ti... | <p>You can use the same approach as in this answer for VegaLite (<a href="https://stackoverflow.com/questions/64310906/vega-lite-skip-week-end-non-business-days-in-temporal-axis">Vega-Lite - Skip week-end (non-business days) in temporal axis</a>); using an ordinal axis with a timeUnit encoding:</p>
<pre class="lang-py ... | Python Altair how do I skip (or squeeze) part of the x axis? | python-3.x|altair|vega-lite | 1 | 46 | 1 | 72,330,402 | 72,330,402 | 1 | true | 2022-05-21T13:11:42.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Altair how do I skip (or squeeze) part of the x axis?<p>Say I have data indexed by date time (<code>pd.Timestamp</code> type), but I know for certain ... |
72,238,204 | Issue in Maven java swing build in Netbeans<p>I am working on a Netbeans Maven Java Application in Netbeans. not able to build a java swing application. Dependency are not downloading in .m2 folder.</p>
<p><a href="https://i.stack.imgur.com/tvJta.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tvJta.... | <p>.<a href="https://i.stack.imgur.com/CWtAZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CWtAZ.png" alt="enter image description here" /></a></p>
<p>Add the above code in the setting.xml file (C:\Users\PC.m2\settings.xml)</p> | Issue in Maven java swing build in Netbeans | maven|netbeans|pom.xml | 0 | 46 | 1 | 72,331,020 | 72,331,020 | 1 | true | 2022-05-14T07:31:59.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issue in Maven java swing build in Netbeans<p>I am working on a Netbeans Maven Java Application in Netbeans. not able to build a java swing application. Depe... |
72,333,844 | What does random.seed([list of int]) do?<p>I know what random.seed(int) does, like below:</p>
<pre><code>random.seed(10)
</code></pre>
<p>But I saw a code which uses random.seed([list of int]), like below:</p>
<pre><code>random.seed([1, 2, 1000])
</code></pre>
<p>What is the difference between passing a list and int to... | <p>The answer is basically in the comments, but putting it together: it appears the code you found imports <code>random</code> from <code>numpy</code>, instead of importing the standard Python <code>random</code> module:</p>
<pre><code>from numpy import random
random.seed([1, 2, 1000])
</code></pre>
<p>Not recommended... | What does random.seed([list of int]) do? | python | -2 | 46 | 1 | 72,333,889 | 72,333,889 | 1 | true | 2022-05-21T23:23:46.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does random.seed([list of int]) do?<p>I know what random.seed(int) does, like below:</p>
<pre><code>random.seed(10)
</code></pre>
<p>But I saw a code wh... |
72,337,220 | C# Datagridview method Rows.Add works incorrectly - it add line on previous, not on last<p>I have a problem with datagridview.Rows.Add method. I want to add a new line but in the last line, not in previous. I don't know why the method Add doesn't work in this case. My code:</p>
<pre><code> dataGridView1.RowCount... | <p>A better idea is not to set <code>RowCount</code> when you will be entering new rows. So if open to a alternate read on.</p>
<p>In the example below there is no assertion to validate <code>row.Cells[3].Value</code> is an int but in the 2nd block shows how to check correctly.</p>
<pre><code>public partial class Form1... | C# Datagridview method Rows.Add works incorrectly - it add line on previous, not on last | c#|datagridview|datagridviewrow | 0 | 46 | 2 | 72,337,669 | 72,337,669 | 1 | true | 2022-05-22T11:37:31.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# Datagridview method Rows.Add works incorrectly - it add line on previous, not on last<p>I have a problem with datagridview.Rows.Add method. I want to add ... |
72,332,834 | Typescript itterate through typescript object : interface but keep typing<p>I have a method which takes an object which is a Partial I wuold like to itterate though that object using Object.entries and then based on the key I wuold like to perform some operations. The interface has keys which are string but values whic... | <p>Your original type</p>
<pre><code>Record<keyof IClient, (val: string) => void>
</code></pre>
<p>uses <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeystype" rel="nofollow noreferrer">the <code>Record<K, V></code> utility type</a>, which is implemented as a <a href="htt... | Typescript itterate through typescript object : interface but keep typing | typescript|generics|typing | 1 | 46 | 1 | 72,342,417 | 72,342,417 | 1 | true | 2022-05-21T19:58:57.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript itterate through typescript object : interface but keep typing<p>I have a method which takes an object which is a Partial I wuold like to itterate... |
72,342,939 | How to enable authentication in MaxScale in MONGO for production?<p>We have a MariaBD version using MaxScale to use the NoSQL version using MongoDB driver.</p>
<p>However, the connection is made without authentication and so it is possible to create new databases and collections within MaxScale.</p>
<p>How to enable au... | <p>You can require authentication of clients by adding <a href="https://mariadb.com/kb/en/mariadb-maxscale-6-nosql-protocol-module/#enforce-authentication" rel="nofollow noreferrer"><code>nosqlprotocol.authentication_required=true</code></a> in the listener configuration.</p> | How to enable authentication in MaxScale in MONGO for production? | nosql|mariadb|maxscale | 0 | 46 | 2 | 72,343,818 | 72,343,818 | 1 | true | 2022-05-23T03:17:44.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to enable authentication in MaxScale in MONGO for production?<p>We have a MariaBD version using MaxScale to use the NoSQL version using MongoDB driver.</... |
72,344,874 | Is there a way to visually hold a button after it's been pressed in PySimleGUI?<p>I want to replace a dropdown with the user clicking an option instead.</p>
<p>I currently have this:</p>
<p><a href="https://i.stack.imgur.com/kN3Nx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kN3Nx.png" alt="enter ... | <p>There's no option <code>indicatoron</code> provided now, but tkinter code will work for it.</p>
<blockquote>
<p>Normally a radiobutton displays its indicator. If you set this option to zero, the indicator disappears, and the entire widget becomes a “push-push” indicatoron button that looks raised when it is cleared ... | Is there a way to visually hold a button after it's been pressed in PySimleGUI? | python|user-interface|button|pysimplegui | 0 | 46 | 1 | 72,345,576 | 72,345,576 | 1 | true | 2022-05-23T07:41:22.303Z | 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 visually hold a button after it's been pressed in PySimleGUI?<p>I want to replace a dropdown with the user clicking an option instead.</p>
... |
72,345,754 | Submit a parameter via form_for that isn't an attribute on the model instance?<p>I have a relatively simple question. I have a <code>form_for</code> which works nicely, I'd like to pass through a random parameter that doesn't belong to the User model, nor to any associated model (e.g. it shouldn't rely on <code>accepts... | <p>There is a way to do it without editing the model and that may be handy if this parameter is not really a part of the model.</p>
<p>You can just add plain tags inside the <code>form_for</code> like this:</p>
<pre><code><%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
... | Submit a parameter via form_for that isn't an attribute on the model instance? | ruby-on-rails | 0 | 46 | 1 | 72,347,470 | 72,347,470 | 1 | true | 2022-05-23T08:53:37.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Submit a parameter via form_for that isn't an attribute on the model instance?<p>I have a relatively simple question. I have a <code>form_for</code> which wo... |
72,343,123 | Stroke not applied to React-Icons<p><strong>Stroke or Text nothing is applied with react-icons</strong></p>
<pre class="lang-js prettyprint-override"><code> <AiOutlineArrowLeft
className="cursor-pointer text-xl text-orange-800 stroke-4"
onClick={(e) => handleBurger(e)}
... | <p>This is because tailwind only has <code>stroke-0</code>,<code>stroke-1</code> and <code>stroke-2</code> classes defined whereas you had defined <code>stroke-4</code>.</p>
<p>Find more <a href="https://tailwindcss.com/docs/stroke-width#setting-the-stroke-width" rel="nofollow noreferrer">here</a></p> | Stroke not applied to React-Icons | reactjs|tailwind-css|react-icons | 0 | 46 | 1 | 72,348,064 | 72,348,064 | 1 | true | 2022-05-23T03:59:05.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Stroke not applied to React-Icons<p><strong>Stroke or Text nothing is applied with react-icons</strong></p>
<pre class="lang-js prettyprint-override"><code> ... |
72,349,456 | Remove lists of list that has a specific duplicate index without keeping the first one found and keeping order<p>If I had a simple list of values I could totally remove the duplicates like this:</p>
<pre><code>lines = ['a','b','a']
final_lines = [l for l in lines if lines.count(l) == 1]
</code></pre>
<p>Output:</p>
<p... | <p>One approach: use a list of what you want to compare for each item:</p>
<pre><code>firsts = [x[0] for x in lines]
final_lines = [l for l in lines if firsts.count(l[0]) == 1]
</code></pre> | Remove lists of list that has a specific duplicate index without keeping the first one found and keeping order | python|duplicates | 0 | 46 | 1 | 72,349,518 | 72,349,518 | 1 | true | 2022-05-23T13:31:24.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove lists of list that has a specific duplicate index without keeping the first one found and keeping order<p>If I had a simple list of values I could tot... |
72,353,866 | Getting an array of Promises after async await<p>i'm trying to create an array of the daily forecast mapping over an array with cities.
I'm trying to map over the array of the cities making an api call for each one of them once the page loads.
I keep on getting an array of Promises such as this :
<a href="https://i.sta... | <p>As Brian has said you're not actually awaiting the promises, but the map function.</p>
<p>Try something like this (untested):</p>
<pre class="lang-js prettyprint-override"><code> const fetchData = async () => {
const promises = favorites.map((city) => {
return weatherService.getSingleForeCast(... | Getting an array of Promises after async await | javascript|reactjs|api|async-await | 1 | 46 | 1 | 72,354,079 | 72,354,079 | 1 | true | 2022-05-23T19:27:16.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting an array of Promises after async await<p>i'm trying to create an array of the daily forecast mapping over an array with cities.
I'm trying to map ove... |
72,351,948 | One line code for array of content to convert dictionary of values in ruby<pre><code>data = [ " 64 40 64 41 144 144\r\n", " 68 40 64 41 144 144\r\n", " 72 41 ... | <p>You can write that as follows.</p>
<pre><code>keys = ["x", "y", "m", "n", "o"]
data.map { |s| keys.zip(s.scan(/\d+/).map(&:to_i)).to_h }
#=> [{"x"=>64, "y"=>40, "m"=>64, "n"=>41, "o"=>144},
... | One line code for array of content to convert dictionary of values in ruby | ruby | 0 | 46 | 2 | 72,355,374 | 72,355,374 | 1 | true | 2022-05-23T16:32:40.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
One line code for array of content to convert dictionary of values in ruby<pre><code>data = [ " 64 40 64 ... |
72,357,397 | Add Size in Elastic NativeSearchQuery<pre><code> final QueryBuilder contentTagQuery = QueryBuilders.boolQuery()
.filter( QueryBuilders.termQuery("tenantId" , "en"));
SearchHits<Content> searchHits =
elasticsearchOperations.search(
... | <p>You can set this on the <code>Query</code> instance:</p>
<pre class="lang-java prettyprint-override"><code>NativeSearchQuery query = new NativeSearchQuery(contentTagQuery);
query.setMaxResults(1);
</code></pre> | Add Size in Elastic NativeSearchQuery | spring-boot|elasticsearch|spring-data-elasticsearch | 0 | 46 | 1 | 72,358,633 | 72,358,633 | 1 | true | 2022-05-24T05:01:39.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add Size in Elastic NativeSearchQuery<pre><code> final QueryBuilder contentTagQuery = QueryBuilders.boolQuery()
.filter( QueryBuilders... |
72,356,914 | Hide x and y axis from the plot loaded with imager package<p>I try to code below to insert and display an image in the presentation file with rmarkdown:</p>
<pre><code>library(imager)
img <- load.image('https://makeshop-multi-images.akamaized.net/figmaster1/shopimages/98/82/1_000000018298.jpg')
plot(img, xaxt = &quo... | <p>Is this what you are looking for?</p>
<pre><code>plot(img, axes=FALSE)
</code></pre>
<p><a href="https://i.stack.imgur.com/Yo5I7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yo5I7.png" alt="enter image description here" /></a></p>
<p>Check the documentation at <a href="https://www.rdocumentati... | Hide x and y axis from the plot loaded with imager package | r|ggplot2|plot | 0 | 46 | 1 | 72,358,684 | 72,358,684 | 1 | true | 2022-05-24T03:31:53.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Hide x and y axis from the plot loaded with imager package<p>I try to code below to insert and display an image in the presentation file with rmarkdown:</p>
... |
72,362,552 | TypeError: not all arguments converted during string formatting in vertica_python<p>I'm trying to insert some values into my vertica database using the vertica_python module:</p>
<pre><code>
data = {'SalesNo': ['12345', '678910'],
'ProductID': ['12345_2021-10-21_08:51:22', '678910_2021-10-21_10:27:03'],
... | <p>My guess is that you should use <code>%s</code> and not <code>?</code> as placeholder in your string:</p>
<pre><code>SQL_insert = f"INSERT INTO table_name ({','.join(list(column))}) VALUES ({' %s,'*(n-1)} %s);"
</code></pre>
<p>Then the output string will be <code>'INSERT INTO table_name (SalesNo,ProductID... | TypeError: not all arguments converted during string formatting in vertica_python | python|sql|vertica | 0 | 46 | 1 | 72,362,685 | 72,362,685 | 1 | true | 2022-05-24T12:02:17.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TypeError: not all arguments converted during string formatting in vertica_python<p>I'm trying to insert some values into my vertica database using the verti... |
72,352,122 | How to set pattern origin at the top left point of each bar of a barchart in d3.js?<p>I created a barchart and used patterns to fill it. For each pattern, I set x=0 and y=0, but I don't know where this (0,0) point is, so I don't know my pattern start tiling from where .</p>
<p>I want to set the top left corner of bar a... | <p>What you could do, is to add the patterns using D3 as well. D3 actually lets you add any type of tag to the DOM. Therefore, you could do a second join to add the patterns. In the following code I just "copied" your logic, but now the pattern is in the g element, and the patterns position is at the top left... | How to set pattern origin at the top left point of each bar of a barchart in d3.js? | javascript|css|svg|d3.js|data-visualization | 0 | 46 | 1 | 72,364,726 | 72,364,726 | 1 | true | 2022-05-23T16:48:19.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set pattern origin at the top left point of each bar of a barchart in d3.js?<p>I created a barchart and used patterns to fill it. For each pattern, I ... |
72,364,839 | pg_dump toc.dat missing public schema line<p>I'm trying to parse the toc.dat file and I see different result when dumping same database from different pg_dump versions. On <code>9.6</code> I've got line with <code>SCHEMA public postgres</code> but I don't have this line from <code>11</code> <code>pg_dump</code>.</p>
<p... | <p>See this commit <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5955d934194c3888f30318209ade71b53d29777f" rel="nofollow noreferrer">pg_dump</a> the relevant part being:</p>
<blockquote>
<p>This has the visible effect that the public schema won't be mentioned in the output at all, except for u... | pg_dump toc.dat missing public schema line | postgresql|postgresql-9.6|pg-dump|postgresql-11|pg-restore | 0 | 46 | 1 | 72,364,944 | 72,364,944 | 1 | true | 2022-05-24T14:37:16.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pg_dump toc.dat missing public schema line<p>I'm trying to parse the toc.dat file and I see different result when dumping same database from different pg_dum... |
72,361,869 | Web-Form not accepting responses(Asp.net)<p>Recently i am working on a <strong>web-form</strong> written in <strong>asp.net framework</strong>. I have kept in mind to include <code>!IsPostBack()</code> but yet my form is not accepting the responses and updating the database accordingly.
The body of the <strong>.aspx</s... | <p>Makes no sense to check !IsPostBack in a button click. Such a button click will ALWAYS be a post-back. So, that's confusing.</p>
<p>And same goes for your sql insert. Your trying to insert the "text" of the control.</p>
<p>eg this:</p>
<pre><code> string strSQL =
"insert into feedba... | Web-Form not accepting responses(Asp.net) | html|asp.net|webforms|backend|web-development-server | 0 | 46 | 1 | 72,367,845 | 72,367,845 | 1 | true | 2022-05-24T11:13:13.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Web-Form not accepting responses(Asp.net)<p>Recently i am working on a <strong>web-form</strong> written in <strong>asp.net framework</strong>. I have kept i... |
72,344,178 | Delaying a queue for a finite time, conditionally<p>How could I delay a background queue's execution, without using sleep? Further, how could I interrupt that delay if needs be?</p>
<p>The docs for <code>RunLoop</code> suggest a while loop around the function <code>run</code> with a custom condition in the while loop. ... | <p>You can <a href="https://developer.apple.com/documentation/dispatch/dispatchobject/1452801-suspend" rel="nofollow noreferrer"><code>suspend</code></a> custom dispatch queues (but not global queues nor main queue). That stops new tasks from starting on that queue, but it does not affect things already running on that... | Delaying a queue for a finite time, conditionally | swift|timer|grand-central-dispatch | 0 | 46 | 1 | 72,370,954 | 72,370,954 | 1 | true | 2022-05-23T06:39:48.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delaying a queue for a finite time, conditionally<p>How could I delay a background queue's execution, without using sleep? Further, how could I interrupt tha... |
72,371,603 | How to merge excel rows based on date and another category<p><a href="https://i.stack.imgur.com/fdq69.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fdq69.png" alt="enter image description here" /></a></p>
<p>Which is an excel formula I can use to combine rows together based on the same category and... | <p>Formula-based alternative for O365:</p>
<p><code>=LET(ζ,SORT(UNIQUE(A2:B25),{1,2}),CHOOSE({1,1,2},ζ,SUMIFS(C2:C25,A2:A25,INDEX(ζ,,1),B2:B25,INDEX(ζ,,2))))</code></p> | How to merge excel rows based on date and another category | excel|excel-formula | 0 | 46 | 2 | 72,373,635 | 72,373,635 | 1 | true | 2022-05-25T03:15:20.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to merge excel rows based on date and another category<p><a href="https://i.stack.imgur.com/fdq69.png" rel="nofollow noreferrer"><img src="https://i.stac... |
72,373,391 | Inquiry to write function to javascript Object JSDoc property<p>I need to put a function in a javascript object, how do I add a JSDoc comment in this case?</p>
<pre><code>/**
* @typedef {Object} testObj
* @property {!String} testName - testName
* @property {?Function} [testFunction=null] - testFunction
*
*/
var te... | <p>Use <code>@function</code> to define the function first, and then use the name of the function anywhere you need it, example:</p>
<pre class="lang-js prettyprint-override"><code>/**
* A test function
*
* @function testFunction
* @param {number} a Number a
* @param {number} b Number b
* @param {Object} c Obj... | Inquiry to write function to javascript Object JSDoc property | javascript|jsdoc | 0 | 46 | 1 | 72,375,452 | 72,375,452 | 1 | true | 2022-05-25T07:18:56.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inquiry to write function to javascript Object JSDoc property<p>I need to put a function in a javascript object, how do I add a JSDoc comment in this case?</... |
72,374,014 | identify selector by index<p>I want to use the robot framework to automate the user action to hover on bar chart.</p>
<p>Is there a way to identify the bar chart by index?</p>
<p>or what should be the selector for me to use the robot framework to hover on the first bar chart?</p>
<p>I could not find a unique element wh... | <p>The first bar of the five can be selected in CSS by:</p>
<pre><code>.recharts-layer.recharts-bar-rectangle:first-child:hover
</code></pre>
<p>To demonstrate this, this snippet changes the path's fill color to blue on hover of the bar.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" d... | identify selector by index | css|xpath|robotframework | 0 | 46 | 1 | 72,375,563 | 72,375,563 | 1 | true | 2022-05-25T08:05:59.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
identify selector by index<p>I want to use the robot framework to automate the user action to hover on bar chart.</p>
<p>Is there a way to identify the bar c... |
72,379,310 | C# Getting SwipeView Item/Object that invoked event<p>Sorry, new here. I've got a CollectionView of objects and there fields, when I invoke the delete event using SwipeView I want to be able to use the object that was selected to pass into an SQLite query to delete that object from the database. My original plan was to... | <p>use the <code>CommandParameter</code> (do not set <code>BindingContext</code>)</p>
<pre><code><SwipeItem Invoked="DeleteItem_Invoked" CommandParameter="{Binding .}" />
</code></pre>
<p>then in the event handler</p>
<pre><code>private void DeleteItem_Invoked(object sender, EventArgs e)
{
... | C# Getting SwipeView Item/Object that invoked event | c#|sqlite|xamarin|swipeview | 1 | 46 | 1 | 72,379,409 | 72,379,409 | 1 | true | 2022-05-25T14:17:41.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# Getting SwipeView Item/Object that invoked event<p>Sorry, new here. I've got a CollectionView of objects and there fields, when I invoke the delete event ... |
72,379,200 | generate 2 different random numbers from an Array?<p>my only issue so far is when the ships have the same value, I get an error message if I'm using VSC.
TypeError: Assignment to constant variable.
I was trying to get to different values by using the condition but I think it doesn't work.</p>
<p><div class="snippet" da... | <p>One other approach you could try is to create a function <code>pickRandomEntries()</code> that will pick N random entries from an array, without ever picking the same ones.</p>
<p>To do this, we shuffle a copy of your <code>flatArray()</code>, then pick the first two items.</p>
<p>This way we never have to check for... | generate 2 different random numbers from an Array? | javascript | 1 | 46 | 3 | 72,379,976 | 72,379,976 | 1 | true | 2022-05-25T14:10:29.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
generate 2 different random numbers from an Array?<p>my only issue so far is when the ships have the same value, I get an error message if I'm using VSC.
Typ... |
72,380,870 | Why can't I set the ReceiveTimeout property on System.Net.Sockets.Socket?<p>I'm attempting to set the <code>ReceiveTimeout</code> property an a <code>System.Net.Sockets.Sockets</code> object. I get no exceptions, but the value doesn't stick. Example:</p>
<pre><code> m_socket = new Socket(RemoteEndPoint.AddressFami... | <p>You're setting the value to 0, because that's the value of <code>TimeSpan.Milliseconds</code> for a 1-second timespan. The <code>Milliseconds</code> property is effectively "the sub-second millisecond component" - in the same way that (for example) the <code>Minutes</code> property for <code>TimeSpan.FromH... | Why can't I set the ReceiveTimeout property on System.Net.Sockets.Socket? | c#|.net|sockets | 0 | 46 | 1 | 72,380,929 | 72,380,929 | 1 | true | 2022-05-25T15:59:10.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't I set the ReceiveTimeout property on System.Net.Sockets.Socket?<p>I'm attempting to set the <code>ReceiveTimeout</code> property an a <code>System.... |
72,385,388 | struggling with lapply and column names in a plot matrix<p>I'm struggling to create a matrix of histograms using <code>lapply()</code>. The following produces nine histograms but the x labels are the values in the first row of the data, rather than the column names. I'm hoping for the x labels to be the names of the co... | <p>You can achieve this with your current libraries by simply transforming your data to long format and using ggplot:</p>
<pre><code># transform to long
newdata <- College %>%
pivot_longer(2:10, names_to = "hist")
ggplot(newdata) +
geom_histogram(aes(value), binwidth = 20) +
facet_wrap(~hist,... | struggling with lapply and column names in a plot matrix | r|ggplot2|tidyverse|lapply | 0 | 46 | 2 | 72,385,531 | 72,385,531 | 1 | true | 2022-05-26T00:14:18.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
struggling with lapply and column names in a plot matrix<p>I'm struggling to create a matrix of histograms using <code>lapply()</code>. The following produce... |
72,374,755 | How deeply can you nest classes in VB Dot Net?<p>I would have thought that the answer to this would be easy to find in S.O. or the internet, but I have not been successful. From what I have read so far, my current understanding is just 2 levels - the outer class and then any number of inner classes at level 2.</p> | <p>It appears you would like to continue to organize your code in a series of collapsible "regions", but you would like to prevent simple plain text from being used for naming.</p>
<p>Classes could be used for this but unless you convert all the functions and methods to <code>Shared</code>, they won't be acce... | How deeply can you nest classes in VB Dot Net? | vb.net | -1 | 46 | 1 | 72,385,841 | 72,385,841 | 1 | true | 2022-05-25T09:05:53.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How deeply can you nest classes in VB Dot Net?<p>I would have thought that the answer to this would be easy to find in S.O. or the internet, but I have not b... |
72,387,266 | How to translate from Lomuto Partitioning scheme to Hoare's Partition scheme in QuickSelect/QuickSort?<p>I am working on the problem <a href="https://leetcode.com/problems/k-closest-points-to-origin/" rel="nofollow noreferrer">https://leetcode.com/problems/k-closest-points-to-origin/</a> with the question statement rep... | <p>With Hoare partition scheme, the pivot and elements equal to the pivot can end up anywhere, and after a partition step <code>p</code> is not an index to the pivot, but just a separator, values to the left or at <code>p</code> are <= pivot, values to the right of <code>p</code> are >= pivot. With Hoare partitio... | How to translate from Lomuto Partitioning scheme to Hoare's Partition scheme in QuickSelect/QuickSort? | python|quicksort|quickselect | 0 | 46 | 1 | 72,388,177 | 72,388,177 | 1 | true | 2022-05-26T05:50:04.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to translate from Lomuto Partitioning scheme to Hoare's Partition scheme in QuickSelect/QuickSort?<p>I am working on the problem <a href="https://leetcod... |
72,388,492 | How can I load page content's onto another page's popup?<p>This is the html code for the main page with the popup</p>
<pre><code><div class="box">
<a class="button" href="#divOne">
<img src="~/images/usericon.png" alt="user" width="30" hei... | <p>Move the duplicated code to a <a href="https://www.learnrazorpages.com/razor-pages/partial-pages" rel="nofollow noreferrer">partial</a>, with its <code>@model</code> set to <code>CustomerModel</code>:</p>
<pre><code>@model CustomerModel
<div class="row">
<div class="col-md-4">
... | How can I load page content's onto another page's popup? | c#|html|asp.net-mvc|database|razor-pages | 1 | 46 | 1 | 72,389,763 | 72,389,763 | 1 | true | 2022-05-26T07:50:41.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I load page content's onto another page's popup?<p>This is the html code for the main page with the popup</p>
<pre><code><div class="box"... |
72,796,176 | Find closest item from ALS model using KNN<p>I have a dataset like:</p>
<pre><code>cid_int item_id score
1 678 0.5
2 787 0.6
3 908 0.1
. . .
. . .
</code></pre>
<p>Now I'm running ALS model on this pyspark dataframe for getting recomme... | <p>Yes, <code>model.userFactors</code> will return embeddings for users. In your case, these will be vectors of dimension 5.</p>
<p>Yes, you can use these embeddings for <code>KNN</code> model. If the KNN model will perform poorly, try to increase the <code>rank</code> value - this will increase the dimension of the ve... | Find closest item from ALS model using KNN | python|machine-learning|pyspark|collaborative-filtering|als | 0 | 46 | 1 | 72,796,599 | 72,796,599 | 1 | true | 2022-06-29T05:28:08.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find closest item from ALS model using KNN<p>I have a dataset like:</p>
<pre><code>cid_int item_id score
1 678 0.5
2 787 0.... |
72,782,432 | Locating elements with dynamic attributes<p>I ve been running some tests using selenium java and after every run element attributes in HTML change. I am testing a full web app from intellij ide using selenium 4.1.2 and mvn 3.8.5 while the web app .NET and Angular 13.
Any idea what is the cause of this problem ?</p> | <p>You can locate it by two mwthods 1) if part of the attribute value is static and the remaining value is dynamic lets say id=ABC123 and the 123 is dynamic and ABC is static try to use xpath with contains (@id,'ABC') or try locate the previous element which is static and use following method to traverse and locate thi... | Locating elements with dynamic attributes | java|selenium|unit-testing|automated-tests | 0 | 46 | 1 | 72,796,695 | 72,796,695 | 1 | true | 2022-06-28T07:37:16.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Locating elements with dynamic attributes<p>I ve been running some tests using selenium java and after every run element attributes in HTML change. I am test... |
72,797,894 | R count by group<p>I am trying to count the observations for combinations of groups for a dataset like this:</p>
<pre><code> id Gender Breakfast Lunch Dinner
1 1 M Yes Yes Yes
2 2 F No Yes Yes
3 3 M Yes No Yes
4 4 M Yes Yes Yes
5 5 F Yes... | <p>You may try</p>
<pre><code>library(reshape2)
library(dplyr)
df %>%
melt(id = c("id", "Gender"), variable.name = "meal", value.name = "eat") %>%
group_by(Gender, meal, eat) %>%
summarise(count = n())
Gender meal eat count
<chr> <fct> ... | R count by group | r|dplyr|count|tidyr | 0 | 46 | 2 | 72,797,973 | 72,797,973 | 1 | true | 2022-06-29T08:07:19.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R count by group<p>I am trying to count the observations for combinations of groups for a dataset like this:</p>
<pre><code> id Gender Breakfast Lunch Dinne... |
72,798,798 | Excel custom sorting with custom cmp<p>Im totaly new in excel nor in VBA.</p>
<p>I need to write a VBA macro that will sort dogs by total gained points and if the points are same then check each atribute (from left to right) and sort by these.</p>
<p>I wrote some (i think) working sort in python:</p>
<pre><code>import ... | <p>In VBA you have the sort method of the range object:</p>
<pre class="lang-vb prettyprint-override"><code>Range("A6:L11").Sort Key1:=Range("L1"), _
Order1:=xlDescending, _
Key2:=Range("G1"), _
Order2:=xlDescending, _
... | Excel custom sorting with custom cmp | python|excel|vba | 0 | 46 | 1 | 72,799,447 | 72,799,447 | 1 | true | 2022-06-29T09:13:13.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Excel custom sorting with custom cmp<p>Im totaly new in excel nor in VBA.</p>
<p>I need to write a VBA macro that will sort dogs by total gained points and i... |
72,803,849 | Use array for filtering Prisma nextjs<p>having an array with unique names, how can i update the elemets of those names using prisma(in nextjs).
I mean something Like:</p>
<pre><code>const arr=['Joe', 'Mark'];
const update=await prisma.user.updateMany({
where: {
name: //What should i put to update both Joe a... | <p>Try this:</p>
<pre><code>const arr=['Joe', 'Mark'];
const update=await prisma.user.updateMany({
where: {
name: {in: arr}
},
data: {
notifications: {push: "Hello"}
}
});
</code></pre>
<p>"in" will check if name matches anything in that array.
Here is the list of ot... | Use array for filtering Prisma nextjs | javascript|next.js|prisma | 1 | 46 | 1 | 72,803,959 | 72,803,959 | 1 | true | 2022-06-29T15:14:35.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use array for filtering Prisma nextjs<p>having an array with unique names, how can i update the elemets of those names using prisma(in nextjs).
I mean someth... |
72,804,809 | Graph visualization tool<p>I have an edge list of graph
Nodes are strings, NOT numbers
Also there can be thousands of edges
Can anyone suggest me a graph visualisation tool which accepts graph info in some format -json, CSV etc. And visualizes large graphs. Also it works with graph having strings as nodes</p> | <p><a href="https://graphviz.org/" rel="nofollow noreferrer">Graphviz</a> is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics, software engineering, datab... | Graph visualization tool | graph|visualization | 1 | 46 | 2 | 72,809,865 | 72,809,865 | 1 | true | 2022-06-29T16:23:52.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Graph visualization tool<p>I have an edge list of graph
Nodes are strings, NOT numbers
Also there can be thousands of edges
Can anyone suggest me a graph vis... |
72,811,381 | How to add text over parallex scroll(jquery plugin)<p>I was using the jquery plugin:- <a href="https://github.com/pixelcog/parallax.js/" rel="nofollow noreferrer">https://github.com/pixelcog/parallax.js/</a>, to create a parallax scroll in a website.</p>
<p>I installed parallax using npm and also included:-</p>
<pre><c... | <p>Try this,</p>
<pre><code><div class="parallax-window" data-parallax="scroll" data-image-src="https://thumbs.dreamstime.com/b/rainbow-love-heart-background-red-wood-60045149.jpg">
<div class="static-content">
<h1>Some Text</h1>
</div>
</d... | How to add text over parallex scroll(jquery plugin) | javascript|html|jquery|css|parallax.js | 0 | 46 | 2 | 72,812,907 | 72,812,907 | 1 | true | 2022-06-30T06:48:43.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add text over parallex scroll(jquery plugin)<p>I was using the jquery plugin:- <a href="https://github.com/pixelcog/parallax.js/" rel="nofollow norefe... |
72,814,166 | How to add a conditional statement as an argument to a function in python?<p>I have the following function:</p>
<pre><code>def f(loop_condition, count):
while loop_condition:
count += 1
...
</code></pre>
<p>This works with a simple True statement. But what in case I want to have my loop condition to... | <p>You can pass the condition as a string which you then evaluate within your function. For example:</p>
<pre><code>def func(condition, count):
while eval(condition):
count += 1
return count
print(func('count < 3', 0))
</code></pre>
<p><strong>Output:</strong></p>
<pre><code>3
</code></pre> | How to add a conditional statement as an argument to a function in python? | python|function | 0 | 46 | 5 | 72,814,242 | 72,814,242 | 1 | true | 2022-06-30T10:22:54.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add a conditional statement as an argument to a function in python?<p>I have the following function:</p>
<pre><code>def f(loop_condition, count):
... |
72,813,999 | CMake link library from find_package with system lib in wrong order<p>my CMakeLists.txt is as follows</p>
<pre><code>find_pacakge(something)
add_executable(exe main.cc)
# libsomething depends on dlopen/dlsym... so I have to add dl here
target_link_libraries(run PRIVATE something::something dl)
</code></pre>
<p>results:... | <p>Your comment</p>
<blockquote>
<p><code># libsomething depends on dlopen/dlsym... so I have to add dl here</code></p>
</blockquote>
<p>reveals the <strong>core</strong> of the problem: It is <code>libsomething</code> needs linkage with <code>dl</code>, so its <code>find_package(something)</code> should care about tha... | CMake link library from find_package with system lib in wrong order | cmake|cmake-custom-command|find-package | 0 | 46 | 1 | 72,815,099 | 72,815,099 | 1 | true | 2022-06-30T10:11:13.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CMake link library from find_package with system lib in wrong order<p>my CMakeLists.txt is as follows</p>
<pre><code>find_pacakge(something)
add_executable(e... |
72,819,666 | Trying to optimize this T-SQL query<p>I have this T-SQL query that I am trying to optimize.</p>
<p>I am not sure how to make all rest of query starting from "where DateLoad...." should be modified to.</p>
<p>It appears that I could possibly make it simpler, but I am not sure how.</p>
<pre class="lang-sql pret... | <p>Without knowing more context to the data, I dont think you might really be getting expected output based on the minimum of each of the 5 individual columns. Lets try to demostrate with some data</p>
<pre><code>TableMain
Employee_Number DateLoad Employee_Type Status_Type Hire_Date
1 1/25 Z ... | Trying to optimize this T-SQL query | sql-server|tsql|query-optimization | -2 | 46 | 1 | 72,819,940 | 72,819,940 | 1 | true | 2022-06-30T17:12:24.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to optimize this T-SQL query<p>I have this T-SQL query that I am trying to optimize.</p>
<p>I am not sure how to make all rest of query starting from ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.