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,209,349 | KotlinNullPointerException for android::onClick<p>I`m just started learning Kotlin, and i have a problem with one of the buttons.</p>
<p>In MainActivity i have a button, that shows a popup with EditText and Button. In that popup user enters a city, and variable CITY changes according to user input after pressing a butt... | <p><strong>Just simply do this</strong></p>
<pre><code>// Variable declaration
private var btn: Button? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val menuActivity = findViewById<Button>(R.id.ac... | KotlinNullPointerException for android::onClick | android|kotlin | 0 | 99 | 2 | 72,210,044 | 72,210,044 | 3 | true | 2022-05-12T02:03:53.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
KotlinNullPointerException for android::onClick<p>I`m just started learning Kotlin, and i have a problem with one of the buttons.</p>
<p>In MainActivity i ha... |
72,210,818 | How to iterate each row according to values of row above?<p>Suppose sensors are attached to 3 climbers scaling a structure and these sensors capture a certain measurement at random times. The data are captured into the data frame below (the data frame is a lot longer than this):</p>
<pre><code>df = pd.DataFrame({
'Name... | <p>The job essentially seems to be filling missing values by a previous value if such value exists at that measurement for each climber, so <code>groupby.ffill</code> should do the job:</p>
<pre class="lang-py prettyprint-override"><code>out = df[['Name']].join(df.groupby('Name').ffill())
</code></pre>
<p>Output:</p>
<... | How to iterate each row according to values of row above? | python|pandas|dataframe|numpy|pandas-groupby | 0 | 47 | 1 | 72,210,876 | 72,210,876 | 3 | true | 2022-05-12T06:10:52.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to iterate each row according to values of row above?<p>Suppose sensors are attached to 3 climbers scaling a structure and these sensors capture a certai... |
72,212,401 | How to display different colors in geom_point?<p>This is my dataframe:</p>
<pre><code>df = structure(list(qCountry = c("AT", "DE", "ES", "FI", "FR", "GR",
"HU", "IR", "IT", "LV", "NL", "POL", "P... | <p>You can create a new column with the color name and call <code>scale_color_identity()</code>:</p>
<pre class="lang-r prettyprint-override"><code>df %>%
mutate(color_plot = ifelse(qCountry == "EU", "red", "black")) %>%
ggplot(aes(x = reorder(qCountry,-Mean), y = Mean, group = ... | How to display different colors in geom_point? | r|dataframe|ggplot2 | 0 | 32 | 1 | 72,212,461 | 72,212,461 | 3 | true | 2022-05-12T08:34:34.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display different colors in geom_point?<p>This is my dataframe:</p>
<pre><code>df = structure(list(qCountry = c("AT", "DE", "... |
72,213,506 | Do databases use their own binary encodings to store data on disk? Why not use Google Protobuf?<ol>
<li>What binary encodings are used by databases like SQLite 3, MySQL, PostgreSQL, etc to persist data on disk?</li>
<li>If Google Protobuf is good, why not use that to encode and store data on disk?</li>
<li>Are Google P... | <p>"good" is contextual; protobuf is "good" for x-plat general purpose data representation where that data needs to support round-trip of unexpected fields, etc; these are not the same problems that databases face. Databases usually use custom data/memory layouts based on row layouts - and the faste... | Do databases use their own binary encodings to store data on disk? Why not use Google Protobuf? | json|database|encoding|protocol-buffers | 0 | 36 | 1 | 72,213,633 | 72,213,633 | 3 | true | 2022-05-12T09:54:20.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Do databases use their own binary encodings to store data on disk? Why not use Google Protobuf?<ol>
<li>What binary encodings are used by databases like SQLi... |
72,213,568 | How to make a bootstrap card to always have the same dimensions<p>I am making a very simple project in order to learn API calls on Angular, which is working perfectly.
My problem comes with the HTML design. I am using bootstrap 5 to make the design a little bit friendly, but since I have not worked a lot with that libr... | <pre><code><div class="container">
<div class="row">
<div class="col">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">Card title</h5>... | How to make a bootstrap card to always have the same dimensions | html|css|bootstrap-5 | 0 | 69 | 2 | 72,213,905 | 72,213,905 | 3 | true | 2022-05-12T09:58:58.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a bootstrap card to always have the same dimensions<p>I am making a very simple project in order to learn API calls on Angular, which is working ... |
72,215,972 | Accessing property in an object<p>Consider this code snippet</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>class A {
constructor() {
this._elem = 5;
}
get elem() {... | <p>No, they are not equivalent, and this is because <code>obj.elem ? obj.elem : 42</code> will execute the getter and see if its return value is truthy or falsy. If it happens to be falsy, then this expression will evaluate to 42. Yet, <code>"elem" in obj</code> is true independent on whether the method would... | Accessing property in an object | javascript | 0 | 34 | 1 | 72,216,101 | 72,216,101 | 3 | true | 2022-05-12T12:54:41.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Accessing property in an object<p>Consider this code snippet</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="fal... |
72,216,559 | Search Last 7 days excluding today Oracle SQL<p>I have the below code to which I want to return the last 7 days excluding today (for example from 5th May - 11th May as opposed to 5th May - 12th May)</p>
<p>What else would I be able to include to acheive this?</p>
<pre><code> SELECT *
FROM TABLE_1
WHERE DATE_TIME &g... | <p>You want to have a range that starts from 7 days before midnight today and ends before midnight today:</p>
<pre><code>SELECT *
FROM table_name
WHERE date_time >= TRUNC(sysdate) - 7
AND date_time < TRUNC(sysdate);
</code></pre> | Search Last 7 days excluding today Oracle SQL | sql|oracle | 0 | 47 | 2 | 72,216,702 | 72,216,702 | 3 | true | 2022-05-12T13:32:11.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Search Last 7 days excluding today Oracle SQL<p>I have the below code to which I want to return the last 7 days excluding today (for example from 5th May - 1... |
72,212,714 | Can I track workspace changes in Perforce?<p>Our Jenkins job downloads some code from a Perforce server, using a pre-defined workspace. It
sometimes fails with the following error message:</p>
<pre>
Client 'xxxx' can only be used from host 'yyyy'.
</pre>
<p>When I look at the workspace ("client" is an obsolet... | <p>First and foremost, you should set the <code>locked</code> option on the client if you don't want anyone else messing with it (and set its <code>Owner</code> to be the user who runs the Jenkins job, and ensure that this user is password-protected so that nobody else can impersonate Jenkins).</p>
<p>To track changes ... | Can I track workspace changes in Perforce? | continuous-integration|perforce | 0 | 37 | 1 | 72,217,143 | 72,217,143 | 3 | true | 2022-05-12T08:57:47.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I track workspace changes in Perforce?<p>Our Jenkins job downloads some code from a Perforce server, using a pre-defined workspace. It
sometimes fails wi... |
72,218,238 | How to delete first line of a file if it does not contain a specified string?<p>I have files that look like this:</p>
<pre><code>username
Total 0
username
Total 0
username
Total 0
username
Total 0
username
Total 0
</code></pre>
<p>But some are malformed and have the incorrect first line like this:</p>
<pre><code>Total ... | <pre><code>perl -ne 'print if 1 != $. || /username/'
</code></pre> | How to delete first line of a file if it does not contain a specified string? | perl|awk|sed | 0 | 60 | 3 | 72,218,266 | 72,218,266 | 3 | true | 2022-05-12T15:20:44.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to delete first line of a file if it does not contain a specified string?<p>I have files that look like this:</p>
<pre><code>username
Total 0
username
To... |
72,218,599 | PHP Array to String Conversion When Adding Strings in Foreach<p>I have an object which contains currency properties with their respective values. I need to add an extra amount to these, which I have simplified by appending a "+ TAX" value.</p>
<p>But I keep getting "array to string conversion" error... | <p>You're modifying the object while you're looping over it, adding a <code>total</code> property. So a later iteration of the loop tries to use <code>total</code> as a currency and create another element in the nested <code>total</code> array.</p>
<p>Use a separate variable during the loop, then add it to the object a... | PHP Array to String Conversion When Adding Strings in Foreach | php|arrays|object | 0 | 122 | 2 | 72,218,793 | 72,218,793 | 3 | true | 2022-05-12T15:47:17.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP Array to String Conversion When Adding Strings in Foreach<p>I have an object which contains currency properties with their respective values. I need to a... |
72,218,987 | How to merge two objects and keep count<p>I am building a Rails 5.2 app.
In this app I am working with statistics.</p>
<p>I generate two objects:</p>
<pre><code>{
"total_project": {
"website": 1,
"google": 1,
"instagram": 1
}
}
</code></pre>
<p>And... | <pre><code>@total_sources = @total_project.merge(@total_leads) do |key, ts_value, tp_value|
ts_value + tp_value
end
</code></pre>
<p>If there can be more than 2 sources, put everything in an array and do.</p>
<pre><code>@total_sources = source_array.reduce do |accumulator, next_source|
accumulator.merge(next_source... | How to merge two objects and keep count | ruby-on-rails | 0 | 48 | 2 | 72,219,710 | 72,219,710 | 3 | true | 2022-05-12T16:15:56.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to merge two objects and keep count<p>I am building a Rails 5.2 app.
In this app I am working with statistics.</p>
<p>I generate two objects:</p>
<pre><c... |
72,220,061 | Inserting new values in a table if SQL had Dictionary and for-each<p>Let's say my table of <code>myTable</code> has a column1 that has some values already in it.
Now I am given some new values that I should put in a newly created column named '<code>column2</code>' .
These are one to one associated together and unique.... | <p>You can use a <a href="https://docs.microsoft.com/en-us/sql/t-sql/queries/table-value-constructor-transact-sql?view=sql-server-ver15" rel="nofollow noreferrer">Table Value Constructor</a>:</p>
<pre><code>declare @Samples as Table ( Column1 VarChar(10), Column2 VarChar(10) );
-- Initialize the sample data.
insert in... | Inserting new values in a table if SQL had Dictionary and for-each | sql|tsql | 0 | 24 | 2 | 72,221,578 | 72,221,578 | 3 | true | 2022-05-12T17:46:04.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inserting new values in a table if SQL had Dictionary and for-each<p>Let's say my table of <code>myTable</code> has a column1 that has some values already in... |
72,220,612 | Python and CX_Oracle Invalid SQL Statement<p>I'm writing a Python script to fetch some values from Oracle, but by the middle I have to set an ID to a package so it can create the corresponding view with the data I want.</p>
<p>I'm trying to execute:</p>
<pre><code>ora_query = cursor.execute("EXECUTE VW_WEEKLY_CALL... | <p>The statement you provided is not a valid SQL statement. It is a SQL*Plus command. You want to do something like this instead:</p>
<pre><code>company_id = '1111111111'
cursor.callproc('VW_WEEKLY_CALL_LOG_PKG.SET_COMPANY_ID', [company_id])
</code></pre> | Python and CX_Oracle Invalid SQL Statement | python|oracle|cx-oracle | 0 | 112 | 1 | 72,221,605 | 72,221,605 | 3 | true | 2022-05-12T18:39:19.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python and CX_Oracle Invalid SQL Statement<p>I'm writing a Python script to fetch some values from Oracle, but by the middle I have to set an ID to a package... |
72,221,653 | How to save a nested object using typeorm and Nestjs?<p>I have the following Data entity:</p>
<pre><code>@PrimaryGeneratedColumn()
id: number
@Column()
dataA: string
@Column()
dataB: string
@Column()
dataC: number
@Column()
dataD: number
</code></pre>
<p>The data object I am trying to save:</p>
<pre><code>c... | <p>You need to flatten it, write a function to do that before passing object into the <code>Repository</code>.</p>
<pre><code>export function flattenData(data) {
return {
dataA: data.dataA,
dataB: data.nestedData.dataB,
dataC: data.nestedData.dataC,
dataD: data.dataD,
}
}
// the... | How to save a nested object using typeorm and Nestjs? | typescript|postgresql|nestjs|typeorm | 0 | 787 | 1 | 72,222,175 | 72,222,175 | 3 | true | 2022-05-12T20:18:55.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to save a nested object using typeorm and Nestjs?<p>I have the following Data entity:</p>
<pre><code>@PrimaryGeneratedColumn()
id: number
@Column()
d... |
72,222,237 | Accessing a public member from within a generic method<p>I'm trying to have some toolbox with each tool in that toolbox being something quite different in functionality. So every tool would require its own config to be created and passed at the start, or when you need to change params, while the base class would be jus... | <p>When you do this:</p>
<pre><code>public abstract void Setup<T>(T setupParams)
</code></pre>
<p>You are using <code><T></code> to define the type. That type doesn't exists. <code>T</code> isn't a class. You can put any name and compile:</p>
<pre><code>public override void Setup<WhatEver>(WhatEver se... | Accessing a public member from within a generic method | c#|generic-method | 0 | 30 | 1 | 72,222,345 | 72,222,345 | 3 | true | 2022-05-12T21:28:01.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Accessing a public member from within a generic method<p>I'm trying to have some toolbox with each tool in that toolbox being something quite different in fu... |
72,223,114 | PLM: Cannot add dummy variable<p>I am currently working on estimating a fixed-effect model using <code>plm()</code>. The following table is an example of my data (please note that I used arbitrary numbers here). I ran the regression using district and year fixed-effect, and as expected, there was an error due to the du... | <p>Despite the test you point to, this is definitely a collinearity problem. There is no independent information in <code>grade</code> that is not already accounted for by <code>id</code>. Here's a simple example. In this model, the only variable is the <code>id</code> factor - which is essentially estimating the me... | PLM: Cannot add dummy variable | r|panel-data|plm | 0 | 127 | 1 | 72,223,728 | 72,223,728 | 3 | true | 2022-05-12T23:42:57.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PLM: Cannot add dummy variable<p>I am currently working on estimating a fixed-effect model using <code>plm()</code>. The following table is an example of my ... |
72,224,660 | Compilation error - defining a concrete implementation of templated abstract class<p>I have an abstract class in my header file:</p>
<pre><code>template <class T>
class IRepository {
public:
virtual bool SaveData(Result<T> &r) = 0;
//virtual Result<T> & GetData()const =... | <p>While implementing the template class method outside the class definition, the template class requires template arguments:</p>
<pre><code>template <class T>
bool Repo1<T>::SaveData(Result<T> &r)
</code></pre> | Compilation error - defining a concrete implementation of templated abstract class | c++|templates|abstract-class | 0 | 31 | 1 | 72,224,865 | 72,224,865 | 3 | true | 2022-05-13T05:01:28.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Compilation error - defining a concrete implementation of templated abstract class<p>I have an abstract class in my header file:</p>
<pre><code>template <... |
72,213,314 | How to Specifically Schedule Pipelines with Azure DevOps<p>How to schedule a one time run, non-repeating pipeline in AzurDevOps. I want to create this pipeline for our UAT environment, but I don't want to run it manually, so I was thinking is there a way I can put multiple specific dates to run the pipeline?</p> | <p>In short, we can't schedule a <strong>non-repeating</strong> pipeline in DevOps because it defines a schedule using <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/process/scheduled-triggers?view=azure-devops&tabs=yaml#cron-syntax" rel="nofollow noreferrer">cron syntax</a>.
Each Azure Pipelines ... | How to Specifically Schedule Pipelines with Azure DevOps | azure|shell|azure-devops | 0 | 217 | 1 | 72,225,114 | 72,225,114 | 3 | true | 2022-05-12T09:41:10.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Specifically Schedule Pipelines with Azure DevOps<p>How to schedule a one time run, non-repeating pipeline in AzurDevOps. I want to create this pipeli... |
72,226,047 | MongoDB - Loop through array of arrays<p>I have a document that contains an array of arrays in my MongoDB collection.</p>
<pre><code>{
"platformId":"CMC_123",
"carInfo":[
["Toyota",20,"White"],
["Suzuki",19,"Gray"],
[&... | <ol start="2">
<li><p><code>$project</code> -</p>
<p>2.1 <code>$arrayToObject</code> - Convert array to object with result <em>2.1.1</em>.</p>
<p>2.1.1 <code>$map</code> - Iterate <code>carInfo</code> array. Get the first item as <code>k</code> and the second item as <code>v</code> for the current iterated array (<code... | MongoDB - Loop through array of arrays | mongodb|mongodb-query|aggregation-framework | 0 | 203 | 1 | 72,226,155 | 72,226,155 | 3 | true | 2022-05-13T07:42:51.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MongoDB - Loop through array of arrays<p>I have a document that contains an array of arrays in my MongoDB collection.</p>
<pre><code>{
"platformId&q... |
72,226,902 | Can angular polyfills.ts file be safely removed<p>Now that angular is working with Ivy and decided to abandon internet explorer.</p>
<p>Shall we safely remove the <code>polyfills.ts</code> file in our Angular <code>>= v13</code> project?</p> | <p>According to the <a href="https://angular.io/guide/browser-support#enabling-polyfills-with-cli-projects" rel="nofollow noreferrer">docs</a>, Angular has a mandatory polyfill for <code>zone.js</code>. Without this polyfill, your application may not work. So it is not safe to remove the <code>polyfills.ts</code> file.... | Can angular polyfills.ts file be safely removed | angular|polyfills | 0 | 167 | 1 | 72,227,024 | 72,227,024 | 3 | true | 2022-05-13T08:55:28.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can angular polyfills.ts file be safely removed<p>Now that angular is working with Ivy and decided to abandon internet explorer.</p>
<p>Shall we safely remov... |
72,227,597 | Swift AVPlayer How To Stop Automatically When Audio Finished<p>I've created a button to play audio (streaming from a link) with AVPlayer in Swift. How to stop the audio automatically when the audio time is finished?</p>
<p>Here is some of my code :</p>
<pre><code>var player : AVPlayer?
url = URL(string: "https://c... | <p>You can use the NSNotificationCenter Observer</p>
<pre><code> NSNotificationCenter.defaultCenter().addObserver(self, selector: "playerDidFinishPlaying:", name: AVPlayerItemDidPlayToEndTimeNotification, object: item)
player?.play()
</code></pre>
<p>and stop player in this function</p>
<pre><code> ... | Swift AVPlayer How To Stop Automatically When Audio Finished | swift|audio|uikit|avplayer | 0 | 33 | 1 | 72,227,820 | 72,227,820 | 3 | true | 2022-05-13T09:49:29.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swift AVPlayer How To Stop Automatically When Audio Finished<p>I've created a button to play audio (streaming from a link) with AVPlayer in Swift. How to sto... |
72,228,187 | Initialization of multiple empty lists in Python<p>What is the correct way to initialize a bunch of variables to independent empty lists in Python 3?</p>
<pre><code>>>> (a, b) = ([],)*2
>>> a.append([2,3])
>>> a
[[2, 3]]
>>> b
[[2, 3]]
>>> b.append([2,3,])
>>> b
[[2... | <p><em><strong>Why the first attempt does not allocate a, b independently in memory?</strong></em> because they refer to same address in memory.</p>
<pre class="lang-py prettyprint-override"><code>(a, b) = ([],)*2
print(id(a))
print(id(b))
# 4346159296
# 4346159296
</code></pre>
<pre class="lang-py prettyprint-override... | Initialization of multiple empty lists in Python | python|list|memory | 0 | 72 | 3 | 72,228,357 | 72,228,357 | 3 | true | 2022-05-13T10:34:14.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Initialization of multiple empty lists in Python<p>What is the correct way to initialize a bunch of variables to independent empty lists in Python 3?</p>
<pr... |
72,228,498 | Java : Are sub threads lock the main thread?<p>I am new to Java, I have want to starts 02 thread to increase an attribute of an object and I want to print out the value of this attribute until it reach a certain value.
I use 02 threads started inside <code>increaseByThread()</code> method.</p>
<p>I use two code snippet... | <p>You have not started any new thread yet.</p>
<p>Each thread needs to run something. That is it's run method. But by invoking <code>thread.run</code> you just execute that code on the calling thread, which is your main thread.</p>
<p>Instead you need to start the new thread using <code>thread.start()</code>. This fun... | Java : Are sub threads lock the main thread? | java|multithreading | 0 | 61 | 2 | 72,228,606 | 72,228,606 | 3 | true | 2022-05-13T10:58:37.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java : Are sub threads lock the main thread?<p>I am new to Java, I have want to starts 02 thread to increase an attribute of an object and I want to print ou... |
72,227,848 | How to verify ssh key on Gitlab.com<p>I'm setting up a SSH key for the first time on Gitlab.com. I'm stuck at <a href="https://docs.gitlab.com/ee/user/ssh.html#verify-that-you-can-connect" rel="nofollow noreferrer">verifying</a> that you can connect: <code>ssh -T git@gitlab.example.com</code>.</p>
<p>The <code>gitlab.e... | <p>Correct format is <code>ssh -T git@gitlab.com</code>.</p>
<p><code>my-workspace-name</code> is not part of the instance url.</p> | How to verify ssh key on Gitlab.com | git|ssh|gitlab | 0 | 271 | 1 | 72,228,894 | 72,228,894 | 3 | true | 2022-05-13T10:08:00.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to verify ssh key on Gitlab.com<p>I'm setting up a SSH key for the first time on Gitlab.com. I'm stuck at <a href="https://docs.gitlab.com/ee/user/ssh.ht... |
72,229,737 | How i can get selection model from one method to another metod from other class with Table View?<p>I want to get one selected model with name, author,key_words to next window. Where it will be in tex fields. After i changing this, i want to save it in database by SQL Update command</p>
<pre><code>public void displaySel... | <p>You can get a reference to the controller via method <a href="https://openjfx.io/javadoc/18/javafx.fxml/javafx/fxml/FXMLLoader.html#getController()" rel="nofollow noreferrer">getController</a> in class <code>javafx.fxml.FXMLLoader</code>. Then you can invoke methods of the controller class.</p>
<p>Add a method for s... | How i can get selection model from one method to another metod from other class with Table View? | java|javafx|fxml | 0 | 56 | 1 | 72,230,438 | 72,230,438 | 3 | true | 2022-05-13T12:37:30.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How i can get selection model from one method to another metod from other class with Table View?<p>I want to get one selected model with name, author,key_wor... |
72,230,986 | Is there a way to use the #define directive to create a constant struct?<p>Let's say I have this struct</p>
<pre><code>typedef struct
{
int AM;
char* name, surname;
}Item;
</code></pre>
<p>and I want to define a constant NULLitem with AM = -1 and NULL name/surname. Is there a way to do it with #define?</p> | <pre><code>#define NULLitem (const Item){ .AM = -1, .name = NULL, .surname = NULL }
</code></pre>
<p>That's a C99 <a href="http://port70.net/%7Ensz/c/c11/n1570.html#6.5.2.5" rel="nofollow noreferrer">compound literal</a>.</p> | Is there a way to use the #define directive to create a constant struct? | c|struct | 0 | 49 | 1 | 72,231,021 | 72,231,021 | 3 | true | 2022-05-13T14:12:46.977Z | 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 use the #define directive to create a constant struct?<p>Let's say I have this struct</p>
<pre><code>typedef struct
{
int AM;
char... |
72,232,384 | Parameter pack iteration<p>Why this code doesn't compile ?</p>
<pre><code>#include <iostream>
#include <typeinfo>
template <typename ...Ts>
void f();
template <typename T>
void f() {
std::cout << typeid(T).name() << std::endl;
}
template <typename T, typename U, typename ..... | <p>Compiling with g++ gives a pretty clear explanation of what's happening:</p>
<pre><code>prog.cc: In function 'int main(int, char**)':
prog.cc:20:24: error: call of overloaded 'f<int, float, char>()' is ambiguous
20 | f<int, float, char>();
| ~~~~~~~~~~~~~~~~~~~^~
prog.cc:5:6: note: candi... | Parameter pack iteration | c++|variadic-templates | 0 | 57 | 1 | 72,232,486 | 72,232,486 | 3 | true | 2022-05-13T15:58:23.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parameter pack iteration<p>Why this code doesn't compile ?</p>
<pre><code>#include <iostream>
#include <typeinfo>
template <typename ...Ts>... |
72,233,752 | QT QML + C++ MVVM<p>As far as I know in QT QML is not possible to instantiate a C++ class in QML Component, unless it is a QQuickItem.
I would not like to put all ViewModels on ViewEngine context because it is a very bad pratice create all classes in memory without using.</p>
<p>My question is: How can I instantiate a ... | <p>C++ objects do not need to be QQuickItems, they need to be QObjects. You just need to <a href="https://doc.qt.io/qt-5/qqmlengine.html#qmlRegisterType" rel="nofollow noreferrer">register</a> your class with the QQmlEngine, like this:</p>
<pre><code>qmlRegisterType<MyObject>("my.component.library", 1, ... | QT QML + C++ MVVM | qt|mvvm|qml | 0 | 116 | 1 | 72,233,985 | 72,233,985 | 3 | true | 2022-05-13T18:01:59.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
QT QML + C++ MVVM<p>As far as I know in QT QML is not possible to instantiate a C++ class in QML Component, unless it is a QQuickItem.
I would not like to pu... |
72,234,136 | JSON parse a property of an object inside an object?<p>I'm trying to <code>JSON.parse(nodeInfluxSeries)</code> a property that is in an object, that is also in an object and in an array.
Like so:</p>
<pre class="lang-js prettyprint-override"><code> Array [
Object {
"id": 1,
"properties": O... | <p>You need to nest the <code>JSON.parse()</code> inside the <code>properties</code> property of the result.</p>
<pre><code>random.map(r => {
return {
...r,
properties: {
...r.properties,
nodeInfluxSeries: JSON.parse(r.properties.nodeInfluxSeries)
}
};
})
</code></pre>
<p>You can also upd... | JSON parse a property of an object inside an object? | javascript|arrays | 0 | 63 | 1 | 72,234,176 | 72,234,176 | 3 | true | 2022-05-13T18:40:32.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JSON parse a property of an object inside an object?<p>I'm trying to <code>JSON.parse(nodeInfluxSeries)</code> a property that is in an object, that is also ... |
72,234,709 | how can i validate data in dd-mm-yyyy format<p>I have the following date <code>"13-05-2022"</code></p>
<pre><code>if (!validateDate(this.formGeral.value.data.singleDate?.formatted)) {
this.errors.push('Data com formato inválido! Selecione a data de entrega novamente, se o problema persistir, favor entrar e... | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function validateDate(date) {
const regex = new RegExp('([0-2]{1}[0-9]{1}|3[0-1]{1})[-](0[1-9]|1[0-2])[-]([0-9]{4})');
return re... | how can i validate data in dd-mm-yyyy format | javascript|angular | 0 | 31 | 1 | 72,234,787 | 72,234,787 | 3 | true | 2022-05-13T19:44:42.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can i validate data in dd-mm-yyyy format<p>I have the following date <code>"13-05-2022"</code></p>
<pre><code>if (!validateDate(this.formGeral... |
72,237,050 | Change default terminal in VS Code to cmd<p>When I open VS Code, the default terminal is PowerShell and the default path is <code>PS E:\Research\GM\Articles\Modularity\Covariance network\Graph theory\Metric basics\Consensus clustering\clustering_programs_5_2</code>.</p>
<p>Q1: How could I change the default path in Pow... | <p>Press <strong>Ctrl + Shift + P</strong>. Type "def" and the default terminal selection option pops.<br>
<a href="https://i.stack.imgur.com/aH8rg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aH8rg.png" alt="enter image description here" /></a></p>
<p>Click on it and select your preferr... | Change default terminal in VS Code to cmd | visual-studio-code | 0 | 382 | 1 | 72,237,062 | 72,237,062 | 3 | true | 2022-05-14T03:12:26.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change default terminal in VS Code to cmd<p>When I open VS Code, the default terminal is PowerShell and the default path is <code>PS E:\Research\GM\Articles\... |
72,236,802 | Java "Catalan number" generator is almost working right<p><strong>What a Catalan number is:</strong> <a href="https://en.wikipedia.org/wiki/Catalan_number" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Catalan_number</a></p>
<p>I am doing some Java exercises and a couple of the test numbers aren't passing eve... | <p>doubles introduce errors. silently.</p>
<p>Why? Well, computers. They are powerful but they aren't magic.</p>
<p>Think about a numbers line - between 0 and 1 there are an <em>infinite</em> amount of them.</p>
<p>And double purports to be capable of representing that entire infinity. More even; 2.0 is a double.</p>
<... | Java "Catalan number" generator is almost working right | java|catalan | 0 | 64 | 2 | 72,237,142 | 72,237,142 | 3 | true | 2022-05-14T02:02:30.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java "Catalan number" generator is almost working right<p><strong>What a Catalan number is:</strong> <a href="https://en.wikipedia.org/wiki/Catalan_number" r... |
72,237,213 | Safe to delete contents of google cloudbuild bucket?<p>There are images there since a year ago, I am just not sure if they are used or if they are just temporarily stored there when the build happens. Do subsequent deployments override old images or do they just accumulate?</p> | <p>The images are immutable, you can safely delete one without breaking the others</p>
<p>In addition, to clean your images and to save space (and money) you can use a Google Cloud tool named <a href="https://github.com/GoogleCloudPlatform/gcr-cleaner" rel="nofollow noreferrer">GCR cleaner</a></p> | Safe to delete contents of google cloudbuild bucket? | google-cloud-platform|google-cloud-run | 0 | 34 | 1 | 72,251,579 | 72,251,579 | 3 | true | 2022-05-14T03:51:03.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Safe to delete contents of google cloudbuild bucket?<p>There are images there since a year ago, I am just not sure if they are used or if they are just tempo... |
72,209,861 | How to set google.protobuf.Timestamp to null?<p>How to represent a null timestamp in Google ProtoBuf?</p>
<p>I am reading DateTime's from a postgreSQL database--some of which are null--into protobuf TimeStamps.</p>
<pre><code>message test {
google.protobuf.TimestampValue TransactionTime =1;
}
</code></pre>
<p>Unfortu... | <p>As @JayantSeth pointed out, you should use <code>google.protobuf.Timestamp</code>.</p>
<p>Since <code>Protobuf</code> forbids to set field to <code>null</code>, you could use a default value to present <code>null</code> in your application. There are two fields in <a href="https://github.com/protocolbuffers/protobuf... | How to set google.protobuf.Timestamp to null? | timestamp|protocol-buffers|grpc | 0 | 1,587 | 1 | 72,291,422 | 72,291,422 | 3 | true | 2022-05-12T03:35:20.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set google.protobuf.Timestamp to null?<p>How to represent a null timestamp in Google ProtoBuf?</p>
<p>I am reading DateTime's from a postgreSQL databa... |
72,180,166 | Does the Observer Design Pattern Work For Food Delivery Status Updates?<p>I've recently been learning about the Observer design pattern and understand canonical examples like newspapers notifying their subscribers like so:</p>
<pre><code>public class NewsPaper implements Publisher{
List<Subscriber> subscriber... | <p>Normally <strong>observer observable design pattern</strong> is used when there is a <strong>one to many relationship</strong> between objects because the basic idea of this design pattern is to notify about the <strong>state change of the observable object</strong> to <strong>all the observers</strong> who are obse... | Does the Observer Design Pattern Work For Food Delivery Status Updates? | java|oop|design-patterns|observer-pattern | 0 | 129 | 1 | 72,181,537 | 72,181,537 | 3 | true | 2022-05-10T02:41:06.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does the Observer Design Pattern Work For Food Delivery Status Updates?<p>I've recently been learning about the Observer design pattern and understand canoni... |
72,146,933 | trouble with labeling axis with strings using ggplot (R)<p>I'm a college student and we have to create some graphs using Rstudio for an assignment. I've managed to do the core objective for this first task, which is to create a simple bar graph with the provided data; however, I'm having trouble with labeling the axes ... | <p>With <code>ggplot2</code>, you have to use <code>+</code> at the end of your line of code to add additional layers to your plot. If not, then R just reads those lines of code as standalone lines, which will throw an error. So, in your code, the sign is missing at the end of <code>geom_bar</code> and <code>xlab</code... | trouble with labeling axis with strings using ggplot (R) | r|ggplot2 | 0 | 47 | 1 | 72,146,978 | 72,146,978 | 3 | true | 2022-05-06T20:17:32.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
trouble with labeling axis with strings using ggplot (R)<p>I'm a college student and we have to create some graphs using Rstudio for an assignment. I've mana... |
72,208,002 | Kotlin sealed classes and hashcode/equals<p>I'm seeing writing a test that I cannot assert two sealed classes with same "subclass" and same value under the hood are equal. They are distinct.</p>
<pre><code>fun main() {
val a1 = MySealed.A("foo")
val a2 = MySealed.A("foo")
Sys... | <p>That's normal behaviour for any class - two different instances are not equal by default, because it checks for referential equality (i.e. the two references are pointing at the same object in memory).</p>
<pre><code>class NormalClass(val value: String)
val a = NormalClass("foo")
val b = NormalClass("... | Kotlin sealed classes and hashcode/equals | kotlin|equals|hashcode|sealed-class | 0 | 600 | 2 | 72,208,173 | 72,208,173 | 3 | true | 2022-05-11T21:53:35.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kotlin sealed classes and hashcode/equals<p>I'm seeing writing a test that I cannot assert two sealed classes with same "subclass" and same value u... |
72,219,298 | How to prune some unnecessary branches from the Voronoi diagram?<p>I generated the Voronoi diagram using the following MATLAB code. The problem is that in the output image I obtain some useless lines that I want to remove. By useless lines, I mean like those circled in purple, so the lines that are directly attached to... | <p>You are taking each individual pixel as a cell centroid, so the Voronoi diagram encircles each individual pixel. You want to take each group of connected pixels (polygon) as a centroid. And on top of that, somehow include the size of these groups of pixels so that the Voronoi diagram doesn't cut though them.</p>
<p>... | How to prune some unnecessary branches from the Voronoi diagram? | matlab|image-processing|voronoi | 0 | 112 | 1 | 72,219,855 | 72,219,855 | 3 | true | 2022-05-12T16:40:16.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to prune some unnecessary branches from the Voronoi diagram?<p>I generated the Voronoi diagram using the following MATLAB code. The problem is that in th... |
72,190,139 | How to format fetched date in reactJS<p>Hi I have fetched date/data but it showing like that "2022-05-14T14:00:00.000Z". How to convert this to 14/05/2022?</p>
<pre><code> <FetchedDate>
{date}
</FetchedDate>
</code></pre>
<p>Thank you for anyone help.</p> | <p>new Date(date).toLocaleDateString('en-GB');</p>
<p><a href="https://i.stack.imgur.com/91pIK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/91pIK.png" alt="enter image description here" /></a></p> | How to format fetched date in reactJS | reactjs | 0 | 35 | 1 | 72,190,196 | 72,190,196 | 3 | true | 2022-05-10T16:45:15.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to format fetched date in reactJS<p>Hi I have fetched date/data but it showing like that "2022-05-14T14:00:00.000Z". How to convert this to 14/... |
72,146,187 | Why does xtrace show piped commands executing out of order?<p>Here's a simple reproducer:</p>
<pre class="lang-sh prettyprint-override"><code>cat >sample_pipeline.sh << EOF
set -x
head /dev/urandom | awk '{\$2=\$3=""; pr... | <p>When you write a pipeline like that, the shell will fork off a bunch of child processes to run all of the subcommands. Each child process will then print the command it is executing just before it calls exec. Since each child is an independent process, the OS might schedule them in any order, and various things go... | Why does xtrace show piped commands executing out of order? | linux|bash|pipe | 0 | 59 | 2 | 72,146,384 | 72,146,384 | 3 | true | 2022-05-06T18:55:06.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does xtrace show piped commands executing out of order?<p>Here's a simple reproducer:</p>
<pre class="lang-sh prettyprint-override"><code>cat >sample_... |
72,154,041 | why onTap of inkwell is not working ? I tried at every place but its is not working<p>I am new to flutter. why onTap of inkwell is not working? I tried at every place but its is not working. what am i doing wrong in this? is any alternative possible?</p>
<pre><code> InkWell(
onTap: ()=>Search_box(),
child: ... | <blockquote>
<p>The InkWell widget must have a Material widget as an ancestor. The Material widget is where the ink reactions are actually painted</p>
</blockquote>
<p>So you Should wrap the inkwell in Material widget</p>
<p>in your case try this</p>
<pre><code> Padding(
padding: const EdgeIns... | why onTap of inkwell is not working ? I tried at every place but its is not working | flutter|dart|flutter-layout | 0 | 188 | 2 | 72,154,243 | 72,154,243 | 3 | true | 2022-05-07T15:41:46.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why onTap of inkwell is not working ? I tried at every place but its is not working<p>I am new to flutter. why onTap of inkwell is not working? I tried at ev... |
72,148,362 | How do you use mktemp to create directory in Makefile?<p>This is a Makefile piece of code of how someone may use mktemp in a Makefile</p>
<pre><code>TEST=$(shell mktemp -d)
mktemp:
echo $(TEST)
touch $(TEST)/test.txt
ls $(TEST)
cat $(TEST)/test.txt
rm -rf $(TEST)
</code></pre>
<p>This is an example ... | <p>This line:</p>
<pre><code>TEST=$(shell mktemp -d)
</code></pre>
<p>sets the value of the <code>TEST</code> variable to the string <code>$(shell mktemp -d)</code>. It doesn't expand that string (doesn't run the shell command), it just keeps the string as-is.</p>
<p>Now, every time you use that value later in the mak... | How do you use mktemp to create directory in Makefile? | shell|makefile|gnu-make|mktemp | 0 | 112 | 1 | 72,148,385 | 72,148,385 | 3 | true | 2022-05-06T23:40:35.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you use mktemp to create directory in Makefile?<p>This is a Makefile piece of code of how someone may use mktemp in a Makefile</p>
<pre><code>TEST=$(s... |
72,237,595 | Get only the txt file you want from the folder containing the txt file - Python<p>I have a folder with a <code>.txt</code> files. the name of the files are:</p>
<pre><code>my_file1.txt
my_file2.txt
my_file3.txt
my_file4.txt
</code></pre>
<p>In this way, only the last number is different.</p>
<pre><code>import pickle
m... | <p>You can use <code>os.listdir()</code>:</p>
<pre><code>import os
import pickle
my_list = []
path = "/Users/users_a/Desktop/website-basic/sub_domain"
for file in os.listdir(path):
if file.endswith(".txt"):
with open(f"{path}/{file}","r") as f:
my_list.a... | Get only the txt file you want from the folder containing the txt file - Python | python|pickle | 0 | 80 | 1 | 72,237,611 | 72,237,611 | 3 | true | 2022-05-14T05:28:35.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get only the txt file you want from the folder containing the txt file - Python<p>I have a folder with a <code>.txt</code> files. the name of the files are:<... |
72,206,575 | How can ı replace the number to white space in python<p>I have a encrypt decrypt work in phyton, first ı am changed the whitespaces to random numbers. In order to do this job, I converted the string into a list with this code <code> a = [x for x in text]</code> . ı replaced the whitespaces using this code :</p>
<pre cl... | <p>That's because the character <code>'1'</code> (ascii 49) is not the same as the number <code>1</code>.</p>
<p>Try this:</p>
<pre><code>for i in range(lenghtOfText):
try:
if (int(a[i]) in range(0,10)):
a[i]=" "
except:
pass
</code></pre>
<p>Note: Remember range's end is E... | How can ı replace the number to white space in python | python|string|list | 0 | 71 | 3 | 72,206,648 | 72,206,648 | 3 | true | 2022-05-11T19:24:29.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can ı replace the number to white space in python<p>I have a encrypt decrypt work in phyton, first ı am changed the whitespaces to random numbers. In ord... |
72,236,222 | bash output with extra newline within the string<p>I use the following command to output PID and FD related to CLOSE-WAIT sockets.</p>
<pre><code>sudo ss -p | grep CLOSE-WAIT | awk '{ print $7 }' | sed 's/,pid=/ /' | sed 's/,fd=/ /' | sed 's/))//' | awk '{ print $2, $3 }'
</code></pre>
<p>It outputs correctly where a P... | <p>You get an extra newline because <code>for</code> doesn't just split on newlines -- it also splits on spaces, so instead of getting a pid/fd pair assigned to <code>PidFd</code>, it <em>first</em> has a PID assigned, and <em>then</em> has a FD. As extensively documented at <a href="https://mywiki.wooledge.org/DontRea... | bash output with extra newline within the string | linux|bash|awk|sed | 0 | 57 | 2 | 72,236,296 | 72,236,296 | 3 | true | 2022-05-13T23:24:41.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
bash output with extra newline within the string<p>I use the following command to output PID and FD related to CLOSE-WAIT sockets.</p>
<pre><code>sudo ss -p ... |
72,159,878 | how to get deleting rows count in before delete trigger in oracle<p>I'm going to create a before delete trigger in oracle in which I need to know how many records are going to be deleted, letting me to message to user if the number of deleting rows exceeds a threshold (and maybe canceling the deletion)</p>
<p>The quest... | <p>A delete statement can affect many rows. There are four events on which you can place a trigger:</p>
<ul>
<li><strong>before statement</strong> where all you know is that 0 to n deletes are going to take place</li>
<li><strong>before each row</strong> where you only see one row that is about to get deleted</li>
<li>... | how to get deleting rows count in before delete trigger in oracle | sql|oracle|plsql|triggers | 0 | 184 | 1 | 72,160,828 | 72,160,828 | 3 | true | 2022-05-08T09:58:24.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to get deleting rows count in before delete trigger in oracle<p>I'm going to create a before delete trigger in oracle in which I need to know how many re... |
72,224,508 | Python - How to get each item multiplied by the amount the user inputs?<p>I have this python3 code, it's a simple grocery list and the user can type the items he wants to buy and then the output is the total cost. But instead of repeating each item multiple times, I want the user to input the amount like..."2chick... | <p>I would have approach this using <a href="https://docs.python.org/3/library/re.html?highlight=re%20match#re.match" rel="nofollow noreferrer"><code>re.match</code></a> in the following way:</p>
<pre><code>import re
items_dict={"chicken": 50, "fish":30, "tomato":12, "chips":5}
p... | Python - How to get each item multiplied by the amount the user inputs? | python|python-3.x | 0 | 42 | 1 | 72,224,617 | 72,224,617 | 3 | true | 2022-05-13T04:37:13.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python - How to get each item multiplied by the amount the user inputs?<p>I have this python3 code, it's a simple grocery list and the user can type the item... |
72,189,345 | React.createElement: type is invalid using react-bootstrap in ClojureScript<p>I'm trying to use react-bootstrap within re-frame project. I've installed react-bootstrap with</p>
<pre class="lang-sh prettyprint-override"><code>npm install react-bootstrap
</code></pre>
<p>and using its components like the following:</p>
<... | <p>The documentation has a section on how to <a href="https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages" rel="nofollow noreferrer">translate ES <code>import</code></a> for npm packages.</p>
<p>There you'll find that <code>["react-bootstrap/Button" :as Button]</code> should be <code>["... | React.createElement: type is invalid using react-bootstrap in ClojureScript | react-bootstrap|clojurescript|reagent|re-frame|shadow-cljs | 0 | 84 | 1 | 72,196,457 | 72,196,457 | 3 | true | 2022-05-10T15:43:09.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React.createElement: type is invalid using react-bootstrap in ClojureScript<p>I'm trying to use react-bootstrap within re-frame project. I've installed react... |
72,207,475 | What do these symbols mean ??= in flutter<p>I find this in some class and am not sure what they do<br />
<code>??</code> , <code>??=</code></p>
<p>example :</p>
<pre><code>cursorColor ??= selectionTheme.cursorColor ?? cupertinoTheme.primaryColor;
</code></pre> | <p><code>??</code> is used to provide default value for null cases.</p>
<pre class="lang-dart prettyprint-override"><code>int? a ;
int b = a?? 0;// it a is null b will get 0
</code></pre>
<blockquote>
<p><code> b ??= value;</code> Assign value to b if b is null; otherwise, b stays the same</p>
</blockquote>
<p><code>c... | What do these symbols mean ??= in flutter | flutter|dart | 0 | 59 | 2 | 72,207,578 | 72,207,578 | 3 | true | 2022-05-11T20:53:17.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What do these symbols mean ??= in flutter<p>I find this in some class and am not sure what they do<br />
<code>??</code> , <code>??=</code></p>
<p>example :<... |
72,236,662 | Random.Choice always the same result<p>Some pretext that's maybe useful idk. I use mixer and am trying to do a random music choice but the <code>random.choice</code> always take the last one (song 5). This is my code</p>
<pre><code>if Mamp=='1':
vad=input("[1] Bakground music")
#Mixer shit
mixer.init()
pygame... | <pre><code>commands=[mixer.music.load("song1.mp3"), ...]
current_command=random.choice(commands)
current_command
</code></pre>
<p>You're doing this part all wrong.</p>
<p>It seems like you want to make a list of commands to be executed <em>later</em>, but that's not what you're actually doing. The <code>load... | Random.Choice always the same result | python|random|pygame-mixer | 0 | 49 | 1 | 72,236,700 | 72,236,700 | 3 | true | 2022-05-14T01:17:58.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Random.Choice always the same result<p>Some pretext that's maybe useful idk. I use mixer and am trying to do a random music choice but the <code>random.choic... |
72,176,065 | Is there a way to stop datajoint from asking for username and password when I import it<p>In Datajoint, you are prompted for username and password. I am creating a readthedocs website with Sphinx and I need the system to not prompt for username and password. How can I turn it off?</p> | <p>Thanks for asking this question!
There are basically three ways to do this:</p>
<ul>
<li>dj.config.save_local(): This will save the entire dj.config as <code>json</code> on your project level</li>
<li>dj.config.save_global(): This will save is on a system level</li>
<li>System Variables <code>DJ_HOST</code>, <code>D... | Is there a way to stop datajoint from asking for username and password when I import it | datajoint | 0 | 33 | 2 | 72,176,421 | 72,176,421 | 3 | true | 2022-05-09T17:34:24.877Z | 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 stop datajoint from asking for username and password when I import it<p>In Datajoint, you are prompted for username and password. I am crea... |
72,213,918 | cherry pick multiple commits as one without going through each one git apply patch<p>I have branch <em>A</em> with a few commits I need to cherry-pick into branch <em>B</em>.
In the first cherry-picks I've added code that I've later removed in the last commits.</p>
<p>When I try to cherry pick them using <em>first_comm... | <p>One quick way can be : instead of cherry-picking a sequence of individual commits you can create one single squashed commit using <code>git merge --squash</code>.</p>
<hr />
<p>If you want to have a sequence of commits in the end result, then you will need to use <code>cherry-pick</code> or <code>rebase</code> to re... | cherry pick multiple commits as one without going through each one git apply patch | git|commit|cherry-pick | 0 | 106 | 1 | 72,214,422 | 72,214,422 | 3 | true | 2022-05-12T10:25:50.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
cherry pick multiple commits as one without going through each one git apply patch<p>I have branch <em>A</em> with a few commits I need to cherry-pick into b... |
72,172,151 | How to use local jquery in Typo3 v10<p>Hallo I have upgraded from Typo3 v9 to Typo3 v10. Now my jquery configuration in typoscript is not working anymore.</p>
<pre><code>page {
javascriptLibs {
jQuery = 1
jQuery.version = latest
jQuery.source = local
jQuery.noConflict = 0
}
}
</code></pre>
<p>I read... | <p>As you have noticed <a href="https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.2/Deprecation-83806-DeprecatePagejavascriptLibsAndPagejavascriptLibsjQuery.html" rel="nofollow noreferrer"><code>page.javascriptLibs</code> was deprecated with TYPO3v9</a> and <a href="https://docs.typo3.org/c/typo3/cms-core/... | How to use local jquery in Typo3 v10 | jquery|typo3|typoscript | 0 | 54 | 1 | 72,172,249 | 72,172,249 | 3 | true | 2022-05-09T12:37:47.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use local jquery in Typo3 v10<p>Hallo I have upgraded from Typo3 v9 to Typo3 v10. Now my jquery configuration in typoscript is not working anymore.</p... |
72,213,796 | Split property in array into many properties<p>I use get-childitem to get files from directory structure.</p>
<pre><code>Get-ChildItem $path -Recurse -include *.jpg,*.png | select-object Directory, BaseName, Extension
</code></pre>
<p>I get an array of objects with properties Directory, BaseName, Extension.</p>
<p>Like... | <p>Here is a possible approach:</p>
<pre class="lang-sh prettyprint-override"><code>$path = 'C:\test'
$maxDepth = 0
Set-Location $path # Set base path for Resolve-Path -Relative
# Get all files and splits their directory paths
$tempResult = Get-ChildItem $path -Recurse -include *.jpg,*.png | ForEach-Object {
... | Split property in array into many properties | powershell | 0 | 48 | 1 | 72,215,944 | 72,215,944 | 3 | true | 2022-05-12T10:16:44.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Split property in array into many properties<p>I use get-childitem to get files from directory structure.</p>
<pre><code>Get-ChildItem $path -Recurse -includ... |
72,212,866 | how to compare strings in python with "\r" and "\n"<p>I have 2 strings</p>
<pre><code>str1 = "SWITCH ASSY Drawing No.: NA "
str2 = "SWITCH ASSY\r\nDrawing No.: NA\r\n"
</code></pre>
<p>Python evaluates <code>str1 == str2</code> as <code>False</code> and it is pretty obvious why.</p>
<p>What can I ... | <p>Do a regex replacement on all whitespace characters, and replace them with single spaces:</p>
<pre class="lang-py prettyprint-override"><code>str1 = "SWITCH ASSY Drawing No.: NA "
str2 = "SWITCH ASSY\r\nDrawing No.: NA\r\n"
if re.sub(r'\s', ' ', str1) == re.sub(r'\s', ' ', str2):
print(&qu... | how to compare strings in python with "\r" and "\n" | python|string | 0 | 59 | 4 | 72,212,899 | 72,212,899 | 3 | true | 2022-05-12T09:09:25.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to compare strings in python with "\r" and "\n"<p>I have 2 strings</p>
<pre><code>str1 = "SWITCH ASSY Drawing No.: NA "
str2 = "SWITCH A... |
72,145,969 | Using EF Core with WPF and I'd like to revert to initial state when a user press Cancel instead of OK on a dialog, is that possible and how?<p>I'm using EF Core with <a href="https://en.wikipedia.org/wiki/Windows_Presentation_Foundation" rel="nofollow noreferrer">WPF</a> and I'd like to revert any changes done on any o... | <p>Q: Is that possible and how?</p>
<p>A: Sure.</p>
<ol>
<li><p>The most straightforward way is to only "SaveChanges()" when you're "Done" (when the user clicks <kbd>OK</kbd>).</p>
</li>
<li><p>Another approach might be to make <em>copies</em> of the original objects, and perform in-process operatio... | Using EF Core with WPF and I'd like to revert to initial state when a user press Cancel instead of OK on a dialog, is that possible and how? | entity-framework-core|rollback|savechanges|change-tracking|cancel-button | 0 | 74 | 2 | 72,146,103 | 72,146,103 | 3 | true | 2022-05-06T18:32:49.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using EF Core with WPF and I'd like to revert to initial state when a user press Cancel instead of OK on a dialog, is that possible and how?<p>I'm using EF C... |
72,206,115 | Does C++ let a program compiled by itself to return pointer to an array to be used directly?<p>For example, if I have some code string like this:</p>
<pre><code>std::string code = R"(
#include<thread>
#include<iostream>
int main()
{
int array[@@size@@];
std::cout<<(s... | <p>As far as C++ is concerned, there may not even be a concept of processes. They are mentioned in the standard, as far as I can tell, only twice.</p>
<p>Once in a recommendation about lock-free atomics, suggesting that they should also work when shared between processes, and once with regards to possible causes of fil... | Does C++ let a program compiled by itself to return pointer to an array to be used directly? | c++|process|message-passing | 0 | 57 | 2 | 72,206,319 | 72,206,319 | 3 | true | 2022-05-11T18:43:42.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does C++ let a program compiled by itself to return pointer to an array to be used directly?<p>For example, if I have some code string like this:</p>
<pre><c... |
72,151,124 | why alignas(64) not aligned with 64<p>why alignas(64) not aligned with 64? for example:</p>
<pre class="lang-cpp prettyprint-override"><code>struct alignas(32) st32
{
float a;
uint16_t b;
uint64_t c;
};
struct alignas(64) st64
{
float a;
uint16_t b;
uint64_t c;
};
int main()
{
st32 x;
... | <blockquote>
<p>why &st64 b: 0x7ffc59fc9684 is not 0x7ffc59fc9688</p>
</blockquote>
<p>Aligning a structure does not affect the alignment of the sub objects of the structure. The address of the enclosing structure is 64 byte aligned, and <code>b</code> is the second member after a 4 byte sized <code>a</code>, so it... | why alignas(64) not aligned with 64 | c++|alignas | 0 | 91 | 2 | 72,151,358 | 72,151,358 | 3 | true | 2022-05-07T09:17:53.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why alignas(64) not aligned with 64<p>why alignas(64) not aligned with 64? for example:</p>
<pre class="lang-cpp prettyprint-override"><code>struct alignas(3... |
72,171,848 | move semantics for `this`?<p>Imagine the following situation:</p>
<pre><code>class C {
public:
C(std::vector<int> data): data(data) {}
C sub_structure(std::vector<size_t> indices){
std::vector<int> result;
for(auto i : indices)
result.push_back(data[i]); // ***
return C(result)... | <blockquote>
<p>If my call was something like sub_structure(f(), ...), I could overload sub_structure by rvalue reference; however, as a class method, I'm not aware how to do that, basically based on if *this is an rvalue reference.</p>
</blockquote>
<p>Do you mean overloading on <strong>value category</strong>?
Not su... | move semantics for `this`? | c++|move-semantics | 0 | 76 | 1 | 72,171,977 | 72,171,977 | 3 | true | 2022-05-09T12:15:28.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
move semantics for `this`?<p>Imagine the following situation:</p>
<pre><code>class C {
public:
C(std::vector<int> data): data(data) {}
C sub_stru... |
72,203,834 | What is timezone format and how to convert it to a normal abbreviation in Swift?<p>I am working on an iOS app and after networking, I get JSON back with a timezone property formatted as some kind of number. Here is a picture</p>
<p><a href="https://i.stack.imgur.com/FQftm.png" rel="nofollow noreferrer"><img src="https:... | <p><code>32400</code> (seconds) is the equivalent of 9 hours.</p>
<p>You get a <code>TimeZone</code> instance with</p>
<pre><code>TimeZone(secondsFromGMT: timezone)
</code></pre>
<p>which is GMT+0900</p>
<p>However you cannot get the identifier like <code>JST</code> just from the seconds because there are multiple iden... | What is timezone format and how to convert it to a normal abbreviation in Swift? | ios|swift | 0 | 57 | 1 | 72,203,922 | 72,203,922 | 3 | true | 2022-05-11T15:35:26.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is timezone format and how to convert it to a normal abbreviation in Swift?<p>I am working on an iOS app and after networking, I get JSON back with a ti... |
72,180,470 | Best way to append a float in a file with python?<p>I have a file with several variables that looks like this:</p>
<pre><code>BTC = 375.23
SOL = 200.42
LTC = 208.91
DOT = 60.12
</code></pre>
<p>And a main script. How can I append those values ? Example: change <code>BTC = 375.23</code> to <code>BTC = 420.32</code>. The... | <p>The reason you are getting the error is because <code>varfile.BTC</code> is a float.</p>
<pre><code>import varfile
def blah():
# varfile.BTC = 345.23 which is a float and has no append method
varfile.BTC.append(float(420.32))
blah()
</code></pre>
<p>If your goal is to simply change the value of the variab... | Best way to append a float in a file with python? | python|append | 0 | 63 | 1 | 72,180,529 | 72,180,529 | 3 | true | 2022-05-10T03:38:03.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best way to append a float in a file with python?<p>I have a file with several variables that looks like this:</p>
<pre><code>BTC = 375.23
SOL = 200.42
LTC =... |
72,220,468 | How to create a list of objects from with values from another list of values?<p>I'm trying to create a list of objects that hold a list themselves. I'm creating this from another list of elements.</p>
<pre><code>class Test():
temp_list = list()
x = [['a','b','c'],['g','f','h']]
list_of_obj = list()
for i in x:
... | <p>This is because <code>temp_list</code> is a class attribute. Class attributes are not unique to instances of the class . They are universal to all instances.</p>
<p>What you want to do is create and instance attribute for <code>temp_list</code> Like this:</p>
<pre><code>class Test():
def __init__(self):
... | How to create a list of objects from with values from another list of values? | python | 0 | 64 | 1 | 72,220,516 | 72,220,516 | 3 | true | 2022-05-12T18:24:41.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a list of objects from with values from another list of values?<p>I'm trying to create a list of objects that hold a list themselves. I'm creat... |
72,144,950 | Create table from simple UNION statement<p>What is wrong with this union? first 'select' and ')' are incorrect</p>
<pre><code>create table GL_ALL
(
select *from GL1
)
UNION
(
select *from GL2
)
UNION
(
select *from GL3
)
UNION
(
select *from GL4
)
UNION
(
select *from GL5
);
</code></pre> | <p>That's not the correct syntax for creating a table on the fly in SQL Server, or <code>UNION</code> for that matter.</p>
<p>Assuming that the schemas of each of your tables <em>are the same</em></p>
<pre><code>SELECT *
INTO GL_ALL FROM GL1 UNION
SELECT * FROM GL2 UNION
SELECT * FROM GL3 UNION
SELECT * FROM GL4 UNION
... | Create table from simple UNION statement | sql|sql-server|ssms|union|union-all | 0 | 137 | 1 | 72,145,061 | 72,145,061 | 3 | true | 2022-05-06T16:51:07.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create table from simple UNION statement<p>What is wrong with this union? first 'select' and ')' are incorrect</p>
<pre><code>create table GL_ALL
(
select... |
72,219,577 | is it possible to return response from fetch with just promise (no async/await)<p>Why this doesn't work (I borrowed to <a href="https://jsfiddle.net/xlanglat/tyh6jjpy/" rel="nofollow noreferrer">https://jsfiddle.net/xlanglat/tyh6jjpy/</a>):</p>
<pre><code> callWs2 = function(){
let url = 'https://jsonplaceholder.t... | <p><code>.then</code> method returns a <code>Promise</code> and in your case it returns a <code>Promise</code> that resolves with whatever <code>response.text()</code> resolves with. Note: <code>response.text()</code> also returns a <code>Promise</code>.</p>
<blockquote>
<p>Returns another pending promise object, the r... | is it possible to return response from fetch with just promise (no async/await) | javascript|promise|fetch | 0 | 49 | 1 | 72,219,690 | 72,219,690 | 3 | true | 2022-05-12T17:03:29.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
is it possible to return response from fetch with just promise (no async/await)<p>Why this doesn't work (I borrowed to <a href="https://jsfiddle.net/xlanglat... |
72,161,137 | Merge and sort arrays of objects JS/TS/Svelte - conceptual understanding<p>The goal is to display a recent activity overview.</p>
<p>As an example: I would like it to display posts, comments, users.
A post, comment and user object live in its corresponding arrays. All of the objects have a timestamp (below createdAt), ... | <p>This is fun to think about and it's great that you're putting thought into the architecture of the activity feed.</p>
<p>I'd say you're on the right track with how you're thinking of approaching it.</p>
<p>Think about:</p>
<ol>
<li>How you want to model the data for use in your application</li>
<li>How you process t... | Merge and sort arrays of objects JS/TS/Svelte - conceptual understanding | arrays|typescript|sorting|object|svelte | 0 | 145 | 3 | 72,161,444 | 72,161,444 | 3 | true | 2022-05-08T12:45:58.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Merge and sort arrays of objects JS/TS/Svelte - conceptual understanding<p>The goal is to display a recent activity overview.</p>
<p>As an example: I would l... |
72,168,493 | How to add image in a button html<p>How would i add an image on a button? Right now i am trying to create a banner like thing for a big button but the image doesn't seem to get inside the button as shown here:
<a href="https://i.stack.imgur.com/UYxEt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UY... | <p>You can do this:</p>
<pre><code><button class='project_button'>Modular FPS Template <img src='../Images/Projects/Modular-FPS.png' /></button>
</code></pre>
<p>Move your image inside the button.</p> | How to add image in a button html | html|css | 0 | 62 | 4 | 72,168,592 | 72,168,592 | 3 | true | 2022-05-09T07:40:19.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add image in a button html<p>How would i add an image on a button? Right now i am trying to create a banner like thing for a big button but the image ... |
72,206,816 | How to change an enum value in Java?<p>I have an enum <code>Direction</code> which shows legal walking directions. With the helper-method <code>turnLeft</code>
I want to change the value of the called enum Variable, but it does not work: The value of the enum Variable <code>direction</code>is the same after the call of... | <p>You can add the turnLeft/ turnRight methods directly inside the enum.</p>
<pre class="lang-java prettyprint-override"><code>enum Direction{
UP, RIGHT, DOWN, LEFT;
public Direction turnLeft() {
switch(this) {
case UP: return LEFT;
case RIGHT: return UP;
case DOWN: ... | How to change an enum value in Java? | java|enums|switch-statement|helper | 0 | 97 | 1 | 72,207,321 | 72,207,321 | 3 | true | 2022-05-11T19:44:34.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change an enum value in Java?<p>I have an enum <code>Direction</code> which shows legal walking directions. With the helper-method <code>turnLeft</cod... |
72,189,809 | POSIX Thread. Why is the producer-consumer program terminated?<p>I tried to write a simple C producer-consumer program using POSIX Thread, a library for working with threads.</p>
<p>The code has a global queue from where threads exchange information. The queue has been tested and should work correctly. There are also t... | <p>gcc's <code>-fsanitize=address</code> finds the direct problem <a href="https://godbolt.org/z/GqEMvdY7h" rel="nofollow noreferrer">immediately</a> (and so should every debugger).</p>
<pre class="lang-none prettyprint-override"><code>AddressSanitizer:DEADLYSIGNAL
======================================================... | POSIX Thread. Why is the producer-consumer program terminated? | c|multithreading|pthreads|producer-consumer | 0 | 35 | 1 | 72,190,235 | 72,190,235 | 3 | true | 2022-05-10T16:17:48.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
POSIX Thread. Why is the producer-consumer program terminated?<p>I tried to write a simple C producer-consumer program using POSIX Thread, a library for work... |
72,216,518 | Type of arg 1 to keys must be hash error shows on Perl 5.10 but not Perl 5.16<p>I keep getting the following error:</p>
<p><strong>Type of arg 1 to keys must be hash (not hash element)</strong></p>
<p>at this line:</p>
<pre><code>my $command = join(" ", @{$jparams{args}})
. " -cp " . $jparams{cp}
... | <pre class="lang-perl prettyprint-override"><code>keys $jparams{params}
</code></pre>
<p>should be</p>
<pre class="lang-perl prettyprint-override"><code>keys %{ $jparams{params} }
</code></pre>
<hr />
<p>Your code suffers from code injection bugs.</p>
<p>If the command is passed to <code>system</code> (or <code>exec</c... | Type of arg 1 to keys must be hash error shows on Perl 5.10 but not Perl 5.16 | perl | 0 | 50 | 2 | 72,216,927 | 72,216,927 | 3 | true | 2022-05-12T13:29:54.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Type of arg 1 to keys must be hash error shows on Perl 5.10 but not Perl 5.16<p>I keep getting the following error:</p>
<p><strong>Type of arg 1 to keys must... |
72,220,591 | Nginx config to serve an Angular app under an URI prefix where files are generated in the same folder as "index.html"<p>There are a lot of Angular/Nginx examples on the web but I'm still unable to make my config work. I use Angular 13.</p>
<p>In <code>angular.json</code>:</p>
<ul>
<li><code>outputPath</code> is "<... | <p>That's because you do not understand how nginx <code>root</code>, <code>alias</code> and <code>try_files</code> directives actually works. Check the difference between <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#root" rel="nofollow noreferrer"><code>root</code></a> and <a href="https://nginx.or... | Nginx config to serve an Angular app under an URI prefix where files are generated in the same folder as "index.html" | angular|nginx | 0 | 459 | 1 | 72,220,870 | 72,220,870 | 3 | true | 2022-05-12T18:37:00.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nginx config to serve an Angular app under an URI prefix where files are generated in the same folder as "index.html"<p>There are a lot of Angular/Nginx exam... |
72,150,025 | How to validate a file starts with certain perfix format?<p>I have a list of files with names like this.</p>
<p><code>["TYBN-220422-257172171.txt", "TYBN-120522-257172174.txt", "TYBN-320422-657172171.txt", "TYBN-220622-237172174.txt", "TYBN-FRTRE-FFF.txt",....]</code><... | <p>Regex explanation:</p>
<ul>
<li><strong>^</strong> start of the string</li>
<li><strong>$</strong> end of the string</li>
<li><strong>\d</strong> matches all numbers. Equivalent to [0-9]</li>
<li><strong>+</strong> one or many of the expressions</li>
</ul>
<pre class="lang-py prettyprint-override"><code>import re
f... | How to validate a file starts with certain perfix format? | python|python-2.7 | 0 | 51 | 3 | 72,150,090 | 72,150,090 | 3 | true | 2022-05-07T06:25:35.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to validate a file starts with certain perfix format?<p>I have a list of files with names like this.</p>
<p><code>["TYBN-220422-257172171.txt",... |
72,182,976 | Plotly - how to plot Cylinder?<p>I have a function plotting the cylinder, using matplotlib.
<a href="https://i.stack.imgur.com/sfxvg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sfxvg.png" alt="enter image description here" /></a></p>
<p>I am wondering how to do the same using plotly?</p>
<p>below... | <p>I had the chance to spend some time over the problem of creating a cylinder mesh, hence working on the triangulation.</p>
<p>Here is the result. The main function is <code>cylinder_traces</code>: it returns the <code>go.Surface</code> trace, and optionally <code>go.Scatter3d</code> traces representing the wireframe ... | Plotly - how to plot Cylinder? | python|plotly | 0 | 220 | 1 | 72,183,849 | 72,183,849 | 3 | true | 2022-05-10T08:26:21.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plotly - how to plot Cylinder?<p>I have a function plotting the cylinder, using matplotlib.
<a href="https://i.stack.imgur.com/sfxvg.png" rel="nofollow noref... |
72,155,792 | .NET GraphQL Hot Chocolate Projections only working for requested List of Entities but not for requested Single Entities<p>So if i understood it correctly Projections are used to get rid of the Over/ Under fetching problems you would have with normal REST-APIs.</p>
<p>I already implemented a GetAll Functionality for my... | <p>Did you try this?</p>
<pre class="lang-cs prettyprint-override"><code>[ExtendObjectType(typeof(Query))]
public class AuthorQuery {
[UseProjection]
public async Task<IQueryable<Author>> Authors([Service] IAuthorService authorService) {
return await authorService.GetAsync();
}
[Use... | .NET GraphQL Hot Chocolate Projections only working for requested List of Entities but not for requested Single Entities | .net|.net-6.0|hotchocolate | 0 | 330 | 1 | 72,156,310 | 72,156,310 | 3 | true | 2022-05-07T19:28:51.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
.NET GraphQL Hot Chocolate Projections only working for requested List of Entities but not for requested Single Entities<p>So if i understood it correctly Pr... |
72,205,895 | How to run the same JS function multiple times and wait until the previous has finished?<p>I have a function that I need to run multiple times but wait until the previous one has finished.</p>
<p>Currently What I have is:</p>
<pre><code>for(var x = 0; x < rollsArr.length; x++){
rollDice(data.results, x)
}
funct... | <p>You can use async/await or Promise.then(). Reference: <a href="https://zellwk.com/blog/async-await-in-loops/" rel="nofollow noreferrer">https://zellwk.com/blog/async-await-in-loops/</a></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pr... | How to run the same JS function multiple times and wait until the previous has finished? | javascript|async-await|promise|delay | 0 | 141 | 1 | 72,206,050 | 72,206,050 | 3 | true | 2022-05-11T18:22:14.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to run the same JS function multiple times and wait until the previous has finished?<p>I have a function that I need to run multiple times but wait until... |
72,192,386 | javascript on nodejs represent timestamp in a 4 bytes array<p>In order to work with an external API, I need to store in a 4 bytes array the current timestamp.
I saw in their examples that the array should look for example:</p>
<blockquote>
<p>[97, 91, 43, 83] // timestamp</p>
</blockquote>
<p>How did they get to the ab... | <p>A common timestamp metric is <a href="https://en.wikipedia.org/wiki/Unix_time" rel="nofollow noreferrer">Unix time</a>. The time I write this, the unix time is 1652213764, which in hexadecimal is <code>62 7a c8 04</code>, which indeed can be represented with 4 bytes. The equivalent in decimal bytes is <code>98 122 2... | javascript on nodejs represent timestamp in a 4 bytes array | javascript|node.js|typescript|ecmascript-6|timestamp | 0 | 201 | 1 | 72,192,544 | 72,192,544 | 3 | true | 2022-05-10T20:08:09.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
javascript on nodejs represent timestamp in a 4 bytes array<p>In order to work with an external API, I need to store in a 4 bytes array the current timestamp... |
72,161,710 | Most efficient way for finding 3 rows with maximum value in column?<p>Lets us say there is a dataframe <strong>df</strong></p>
<pre><code>Name Balance
A 1000
B 5000
C 3000
D 6000
E 2000
F 5000
</code></pre>
<p>I am looking for an approach through which I can get three rows with highest balances... | <h2>Answer</h2>
<pre class="lang-py prettyprint-override"><code>df = Df({"Name":list("ABCDEF"), "Balance":[1000,5000,3000,6000,2000,5000]})
index = df["Balance"].nlargest(3).index
df.loc[index]
</code></pre>
<h2>Output</h2>
<pre><code> Name Balance
3 D 6000
1 B 50... | Most efficient way for finding 3 rows with maximum value in column? | python|pandas|dataframe|performance|processing-efficiency | 0 | 52 | 2 | 72,161,757 | 72,161,757 | 3 | true | 2022-05-08T13:56:15.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Most efficient way for finding 3 rows with maximum value in column?<p>Lets us say there is a dataframe <strong>df</strong></p>
<pre><code>Name Balance
A ... |
72,157,037 | Optional group in regular expression<p>I have lines I'm trying to match that could be:</p>
<pre><code>ACDNT: BLAHBLAH COUNTY, NC
ACDNT: BLAHBLAH COUNTY, NC PERS INJ
ACDNT: BLAHBLAH COUNTY, NC CMV
ACDNT: SOMEWHERE ELSE
</code></pre>
<p>So I want a regular expression that matches "ACDNT: ", a location with or w... | <p>Try <code>(ACDNT: +)(.*?)( +(CMV|PERS INJ))?$</code></p>
<p>Your problem is that <code>.*</code> is greedy and consumes the entire rest of the string--that's why you're seeing "SOMEWHERE PERS INJ" all in the same group. I changed <code>*</code> to <code>*?</code> to make it reluctant instead of greedy, and... | Optional group in regular expression | java|regex | 0 | 78 | 1 | 72,157,085 | 72,157,085 | 3 | true | 2022-05-07T23:25:06.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Optional group in regular expression<p>I have lines I'm trying to match that could be:</p>
<pre><code>ACDNT: BLAHBLAH COUNTY, NC
ACDNT: BLAHBLAH COUNTY, NC P... |
72,184,386 | Unhandled Exception: FormatException: Invalid radix-10 number (at character 1) in Flutter<p>I am trying to convert string to int but it is throwing an exception "Unhandled Exception: FormatException: Invalid radix-10 number (at character 1)"</p>
<pre><code>String aa = "627a32b69018c4b90f77af19";
int... | <p>The passed string is not a number as it contains non-digit characters like <code>a</code> or <code>f</code>.</p>
<p>It seems that you like to parse the input string as a hexadecimal string, in that case provide a radix (number base) value in your code.</p>
<p>The following snipped yields the output of <code>3.047725... | Unhandled Exception: FormatException: Invalid radix-10 number (at character 1) in Flutter | string|flutter|dart|integer | 0 | 928 | 1 | 72,184,514 | 72,184,514 | 3 | true | 2022-05-10T10:08:52.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unhandled Exception: FormatException: Invalid radix-10 number (at character 1) in Flutter<p>I am trying to convert string to int but it is throwing an except... |
72,200,805 | How to use jq to transform array of objects into separated list of key values - Outputing specific key value instead of array index<p>This is related to my previous question:
<a href="https://stackoverflow.com/questions/71825711/how-to-use-jq-to-format-array-of-objects-to-separated-list-of-key-values">How to use jq to ... | <p>Here's a solution using <code>to_entries</code>, which decomposes an object into an array of key-value pairs:</p>
<pre class="lang-sh prettyprint-override"><code>jq -r '.[] | .id as $id | to_entries[] | [$id,.key,.value] | join("|")'
</code></pre>
<pre class="lang-json prettyprint-override"><code>11|id|11
... | How to use jq to transform array of objects into separated list of key values - Outputing specific key value instead of array index | json|key|jq | 0 | 238 | 1 | 72,200,970 | 72,200,970 | 3 | true | 2022-05-11T12:08:00.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use jq to transform array of objects into separated list of key values - Outputing specific key value instead of array index<p>This is related to my p... |
72,230,647 | Subquery function invoked twice if alias is used in main SQL<p>I'm trying to understand how Oracle processes SQL's to study ways of optimizing complex SQL's. Consider the test function below:</p>
<pre><code>CREATE OR REPLACE FUNCTION FCN_SLOW
RETURN NUMBER IS
BEGIN
DBMS_LOCK.SLEEP (5); --5 seconds
RETURN 0;
END F... | <p>The SQL engine is opting to not materialize the subquery and is pushing the function calls into the outer query where it gets called multiple times for each row. You need to force the function to be evaluated in the subquery where it is called rather than allowing the SQL engine to rewrite the query.</p>
<p>One meth... | Subquery function invoked twice if alias is used in main SQL | oracle|query-optimization | 0 | 58 | 2 | 72,230,828 | 72,230,828 | 3 | true | 2022-05-13T13:48:22.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Subquery function invoked twice if alias is used in main SQL<p>I'm trying to understand how Oracle processes SQL's to study ways of optimizing complex SQL's.... |
72,181,057 | what is the ideal parameters for spectrogram of eeg signal?<p>I am trying to plot a spectrogram of an EEG signal whose sampling rate of 1000Hz and is filtered with a bandpass of 14 - 70 Hz, and the length of the signal is 440 ( and I cant increase the length of the signal). The signal(data link <a href="https://drive.g... | <p>I don't know what output you expect but out can try to change the shading of the pcolormesh. Also you can add a window to the computation of the spectrogram. You can also change the colors use to represent the spectrogram with cmap.</p>
<pre><code>import matplotlib.pyplot as plt
import numpy as np
from scipy import ... | what is the ideal parameters for spectrogram of eeg signal? | python|scipy|signal-processing|spectrogram|time-frequency | 0 | 189 | 1 | 72,181,953 | 72,181,953 | 3 | true | 2022-05-10T05:16:52.213Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what is the ideal parameters for spectrogram of eeg signal?<p>I am trying to plot a spectrogram of an EEG signal whose sampling rate of 1000Hz and is filtere... |
72,161,547 | How can apply_filters be used to create a filter hook in wordpress?<p>Wordpress <a href="https://developer.wordpress.org/reference/functions/apply_filters/" rel="nofollow noreferrer">documentation about apply_filters</a> mentions:</p>
<blockquote>
<p>It is possible to <strong>create new filter hooks</strong> by simply ... | <p>Hooks (actions and filters) have two main components, the part that declares the hook, and the callbacks that implement the hook.</p>
<p>A very simple example is:</p>
<pre class="lang-php prettyprint-override"><code>$name = "Chris";
$name = apply_filters("change_name", $name);
echo $name;
</code>... | How can apply_filters be used to create a filter hook in wordpress? | php|wordpress|filter|hook | 0 | 582 | 1 | 72,162,078 | 72,162,078 | 3 | true | 2022-05-08T13:36:17.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can apply_filters be used to create a filter hook in wordpress?<p>Wordpress <a href="https://developer.wordpress.org/reference/functions/apply_filters/" ... |
72,144,706 | insert the last 30 date in an oracle table<p>I need to create a table where we have one date column. I need to insert the date from yesterday to yesterday-30 days.Table output should look like this</p>
<p><a href="https://i.stack.imgur.com/of35d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/of35d.p... | <p>You can use a hierarchical query such as</p>
<pre><code>CREATE TABLE test AS
SELECT TRUNC(sysdate) - level AS "date"
FROM dual
CONNECT BY level <= 30
</code></pre>
<p>or preferably use directly the query without the first line(<em>CTAS</em>) as a subquery for your main query</p> | insert the last 30 date in an oracle table | sql|oracle | 0 | 33 | 1 | 72,144,762 | 72,144,762 | 3 | true | 2022-05-06T16:29:59.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
insert the last 30 date in an oracle table<p>I need to create a table where we have one date column. I need to insert the date from yesterday to yesterday-30... |
72,186,457 | How to use TryCatch Statement in ToDictionary C#?<p>I have a dictionary of asyncronous call . The problem is sometimes these asyncronous call will throw an exception but I am not entirely sure how to handle them . The GetUserLicenseTypes returns a list so if I do get an exception I still want to return an empty list.</... | <p>Here's one way:</p>
<pre><code>async Task<IEnumerable<string>> GetSubscriptions(Guid userId)
{
try { return await _subscriptionService.GetUserSubscription(companyId, userId); }
catch { return new List<string>(); }
}
var idsWithSubscriptions = await Task.WhenAll(allCompanyUsers
.Select(... | How to use TryCatch Statement in ToDictionary C#? | c#|linq|exception|try-catch | 0 | 57 | 2 | 72,186,898 | 72,186,898 | 3 | true | 2022-05-10T12:38:21.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use TryCatch Statement in ToDictionary C#?<p>I have a dictionary of asyncronous call . The problem is sometimes these asyncronous call will throw an e... |
72,204,168 | How to insert particular column values to another column particular values in python dataframe<p>I have an input dataframe as below:
Input df:</p>
<pre><code> PET City Cost Expense
0 Dog MH 1500.0 NaN
1 Dog BLR 1000.0 NaN
2 Dog DL 2000.0 NaN
3 Cat MH NaN 500... | <p>You can try</p>
<pre class="lang-py prettyprint-override"><code>df.loc[df['PET'].eq('Bird'), 'Cost'] = df.loc[df['PET'].eq('Bird'), 'City'].map(df.set_index('City').loc[lambda x: x['PET'].eq('Cat'), 'Expense'])
</code></pre>
<pre><code>print(df)
PET City Cost Expense
0 Dog MH 1500.0 NaN
1 ... | How to insert particular column values to another column particular values in python dataframe | python-3.x|pandas|dataframe|numpy | 0 | 38 | 1 | 72,204,556 | 72,204,556 | 3 | true | 2022-05-11T15:58:45.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to insert particular column values to another column particular values in python dataframe<p>I have an input dataframe as below:
Input df:</p>
<pre><code... |
72,140,688 | How to select multiple elements into array in Linq query?<p>Net core application. I have below query in my application</p>
<pre><code> var result = sourceProposal.Quotes
.Where(x=>x.QuotationId == sourceQuoteId)
.FirstOrDefault()
.QuoteLines.Select(x=>(x.Quantity,x.WtgType)).ToArray();
</code><... | <p><a href="https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.select?view=net-6.0#system-linq-enumerable-select-2(system-collections-generic-ienumerable((-0))-system-func((-0-1)))" rel="nofollow noreferrer"><code>Select<TSource,TResult></code></a> returns enumerable/queryable of the type returned... | How to select multiple elements into array in Linq query? | c#|linq|asp.net-core | 0 | 308 | 2 | 72,140,845 | 72,140,845 | 3 | true | 2022-05-06T11:22:30.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to select multiple elements into array in Linq query?<p>Net core application. I have below query in my application</p>
<pre><code> var result = sourcePr... |
72,186,891 | SQL Count each occurence of words separated by comma<p>I have a column in a table with words separated by comma. I need to count each occurence of each word<br />
My column looks like : ('a, b, c'), ('a, b, d'), ('b, c, d'), ('a'), ('a, c');
(fiddle at the bottom)</p>
<p>Here is what I get :</p>
<pre><code>MyCol ... | <p>You are using the wrong column. Simply use the <code>[value]</code> column (returned from the <code>STRING_SPLIT()</code> call) and remove the space characters (using <code>TRIM()</code> for SQL Server 2017+ or <code>LTRIM()</code> and <code>RTRIM()</code> for earlier versions):</p>
<pre><code>SELECT TRIM(s.[value])... | SQL Count each occurence of words separated by comma | sql|sql-server|tsql|cross-apply | 0 | 71 | 4 | 72,186,995 | 72,186,995 | 3 | true | 2022-05-10T13:05:22.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Count each occurence of words separated by comma<p>I have a column in a table with words separated by comma. I need to count each occurence of each word<... |
72,221,921 | Error with eslint and vue/comment directive<p>Hello I was just running my website and I have 20 errors like this :</p>
<pre class="lang-js prettyprint-override"><code>Module Error (from ./node_modules/eslint-loader/dist/cjs.js):
error clear vue/comment-directive
</code></pre>
<p>Any idea what is the problem here?</p... | <p>Rules that allow eslint to use eslint-disable functionality in the 'template' are included in all eslint plugin.It supports usage of the following comments:</p>
<ul>
<li>eslint-disable</li>
<li>eslint-enable</li>
<li>eslint-disable-line</li>
<li>eslint-disable-next-line</li>
</ul>
<p>The error you are getting can b... | Error with eslint and vue/comment directive | vue.js|nuxt.js|eslint | 0 | 445 | 1 | 72,238,119 | 72,238,119 | 3 | true | 2022-05-12T20:49:59.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error with eslint and vue/comment directive<p>Hello I was just running my website and I have 20 errors like this :</p>
<pre class="lang-js prettyprint-overri... |
72,234,036 | C++ How to create a constant pointer to a function?<p>I want to have a class with a constant pointer to a function as a member. However, I'm instead creating functions with constant return values (<a href="https://stackoverflow.com/questions/8716330/purpose-of-returning-by-const-value">a strange feature I just run into... | <p>Try doing it in steps, it is more readable also,</p>
<pre><code> using getValue_ptr_type = ComparableValue (*)(const T&);
using const_getValue_ptr_type = const getValue_ptr_type;
const_getValue_ptr_type getValue;
</code></pre>
<p>OR use EAST const (my favorite)</p>
<pre><code> Compa... | C++ How to create a constant pointer to a function? | c++|pointers|compiler-errors|constants | 0 | 62 | 1 | 72,234,122 | 72,234,122 | 3 | true | 2022-05-13T18:31:09.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C++ How to create a constant pointer to a function?<p>I want to have a class with a constant pointer to a function as a member. However, I'm instead creating... |
72,219,622 | how do I share a class between ASP .NET and Framework 4.6 applications?<p>I have two projects. One is targeted to Framework 4.6, another to .NET 6.0
When I try to create a reference, compiler produces an error "Project '..\Common\Common.csproj' targets '.NET6.0'. It cannot be referenced by a project that targets '... | <p>You can share a library if you build it for <a href="https://dotnet.microsoft.com/en-us/platform/dotnet-standard" rel="nofollow noreferrer">.NET Standard</a>. To share a .NET Standard 2.0 library you'll need to target at least .NET Framework 4.6.1, which will be fine unless you need to deploy to Windows Vista or Wi... | how do I share a class between ASP .NET and Framework 4.6 applications? | c#|project|share | 0 | 87 | 1 | 72,219,685 | 72,219,685 | 3 | true | 2022-05-12T17:06:44.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how do I share a class between ASP .NET and Framework 4.6 applications?<p>I have two projects. One is targeted to Framework 4.6, another to .NET 6.0
When I t... |
72,148,769 | There is any objective reason why Scala differentiate fold and reduce functions?<p>Reduce can be an override fold that doesn't take the first element.
I guess there is an answer to that design decision but I can't find it.</p> | <p>The two operations are fundamentally different. Giving them the same name would be confusing. In <a href="https://ruby-lang.org/" rel="nofollow noreferrer">Ruby</a>, the equivalent method is called <a href="https://ruby-doc.org/core/Enumerable.html#method-i-inject" rel="nofollow noreferrer"><code>Enumerable#inject</... | There is any objective reason why Scala differentiate fold and reduce functions? | scala|functional-programming | 0 | 57 | 2 | 72,150,918 | 72,150,918 | 3 | true | 2022-05-07T01:23:04.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
There is any objective reason why Scala differentiate fold and reduce functions?<p>Reduce can be an override fold that doesn't take the first element.
I gues... |
72,225,796 | Want some guide about how to use nvjpegEncodeYUV()<p>I am trying to implement some jpeg encoding cuda code based one a sample code below:
<a href="https://docs.nvidia.com/cuda/nvjpeg/index.html#nvjpeg-encode-examples" rel="nofollow noreferrer">https://docs.nvidia.com/cuda/nvjpeg/index.html#nvjpeg-encode-examples</a></p... | <p>Based on what I see in your code, I'm guessing your input storage format is <a href="https://www.flir.com/support-center/iis/machine-vision/knowledge-base/understanding-yuv-data-formats/" rel="nofollow noreferrer">ordinary YUV422</a>:</p>
<pre><code>U0 Y0 V0 Y1 U2 Y2 V2 Y3 U4 Y4 V4…
</code></pre>
<p>That is an <stro... | Want some guide about how to use nvjpegEncodeYUV() | encoding|cuda|jpeg | 0 | 161 | 1 | 72,242,587 | 72,242,587 | 3 | true | 2022-05-13T07:22:47.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Want some guide about how to use nvjpegEncodeYUV()<p>I am trying to implement some jpeg encoding cuda code based one a sample code below:
<a href="https://do... |
72,229,764 | From keyword not found where expected error in oracle<pre><code>Select firstname as name, time as asof, salary as bal into temp employee
from people.person p
where p.id =1;
</code></pre>
<p>Need to create a temporary table employee by inserting values from already created table person which belongs to people database b... | <p>You'd then use CTAS (Create Table As Select), not an invalid <code>INTO</code> clause; it is used for different purposes.</p>
<pre><code>create table temp_employee as
select firstname as name,
time as asof,
salary as bal
from people.person p
where p.id = 1;
</code></pre>
<hr />
<p>Based on co... | From keyword not found where expected error in oracle | sql|oracle|syntax-error|keyword|execution | 0 | 64 | 1 | 72,229,808 | 72,229,808 | 3 | true | 2022-05-13T12:39:41.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
From keyword not found where expected error in oracle<pre><code>Select firstname as name, time as asof, salary as bal into temp employee
from people.person p... |
72,155,318 | How to hide a menu when clicked on any menu-item?<p>I can not find where is the problem. Any idea about hiding on clicking any menu-item?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-overr... | <p>You cannot get <code>document.getElementById("#1")</code> with <code>#</code>. <code>getElementById</code> is already an id selector, so you don't need to have <code>#</code>.</p>
<p><code>menu.style.display</code>, you don't have inline styles for <code>menu</code>, your condition won't pass for the first... | How to hide a menu when clicked on any menu-item? | javascript | 0 | 58 | 1 | 72,155,439 | 72,155,439 | 3 | true | 2022-05-07T18:21:54.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to hide a menu when clicked on any menu-item?<p>I can not find where is the problem. Any idea about hiding on clicking any menu-item?</p>
<p><div class=... |
72,154,903 | Using "is" operator to compare two variable types in C#<p>I know that I can easily compare two variable types like this:</p>
<pre><code>i.GetType() == i2.GetType())
</code></pre>
<p>Also, this kind of comparison works fine:</p>
<pre><code>int i = 0;
if(i is int){}
</code></pre>
<p>So, why something like this does not w... | <p>There's a difference between a <em>compile time</em> type (using the type name, like <code>int</code>) and a <em>runtime variable</em> which holds information <em>about</em> a type (a variable of type <code>System.Type</code>, such as what's returned by <code>i2.GetType()</code>). You seem to be confusing those two.... | Using "is" operator to compare two variable types in C# | c#|.net|types | 0 | 50 | 1 | 72,155,052 | 72,155,052 | 3 | true | 2022-05-07T17:26:32.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using "is" operator to compare two variable types in C#<p>I know that I can easily compare two variable types like this:</p>
<pre><code>i.GetType() == i2.Get... |
72,151,354 | Check duplicate value in localstorage<p>I want to check if a id exist in database it will just simply replace it. When i try to do that it is adding the same id.</p>
<pre><code>addEntry = (e,id) => {
e.preventDefault()
let product_list = []
let productCost = document.getElementById('projectcost').value;
... | <p>you need to check if the product is already located
in <code>localStorage</code> if so get it index and replace it and if not just append it to the <code>product_list</code></p>
<p>try this</p>
<pre><code>let product_list = []
let productCost = document.getElementById('projectcost').value;
let productQty = docum... | Check duplicate value in localstorage | javascript|local-storage | 0 | 73 | 2 | 72,151,622 | 72,151,622 | 3 | true | 2022-05-07T09:47:32.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check duplicate value in localstorage<p>I want to check if a id exist in database it will just simply replace it. When i try to do that it is adding the same... |
72,173,275 | get number then get n names and count each word vowel char JS<p>The goal is to get a number n from the user then get n words from the user and show each word vowel char count in the console. But it doesn't get the counts correct. #JS #vowel</p>
<pre><code>let n = prompt('Enter the number:');
let wordList = [];
let vow... | <p>remove the carrot symbol from the regex and try:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function getVowels(str) {
var m = str.toString().match(/[aeiou]/gi);
... | get number then get n names and count each word vowel char JS | javascript | 0 | 29 | 2 | 72,173,377 | 72,173,377 | 3 | true | 2022-05-09T14:03:31.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
get number then get n names and count each word vowel char JS<p>The goal is to get a number n from the user then get n words from the user and show each word... |
72,158,133 | How can I Define an Async Action in c#?<p>I really want to know if there is a way to define action variables <code>async</code>? Or some alternative method?</p>
<pre><code>public System.Action myAction;
public async System.Action myAsyncAction;
void Start()
{
// normal action
myAction += () =>
{
... | <p>I've used <code>Func<Task></code> in the past. EG:</p>
<pre class="lang-cs prettyprint-override"><code>Func<Task> asyncMethod = async () =>
{
await Task.Delay(1000);
Console.WriteLine("done here");
};
await asyncMethod();
</code></pre> | How can I Define an Async Action in c#? | c#|asynchronous|async-await|delegates|action | 0 | 79 | 1 | 72,158,166 | 72,158,166 | 3 | true | 2022-05-08T04:46:20.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I Define an Async Action in c#?<p>I really want to know if there is a way to define action variables <code>async</code>? Or some alternative method?<... |
72,206,121 | How can I set a flash variable in Next.js before a redirect?<p>Laravel in PHP made this easy with <a href="https://laravel.com/docs/9.x/session#flash-data" rel="nofollow noreferrer">https://laravel.com/docs/9.x/session#flash-data</a>, so I figured Next.js would have an easy way too.</p>
<p>I thought I'd be able to do s... | <p>Your first code is working fine for me (printing the headers in terminal). However, the combination will not work as intended because the headers you set in <code>/foo</code> (say) will be sent to browser, along with a status code of 307, and a location header of <code>/</code>. Now "the browser" will be r... | How can I set a flash variable in Next.js before a redirect? | node.js|redirect|next.js|http-headers|session-variables | 0 | 518 | 1 | 72,210,574 | 72,210,574 | 3 | true | 2022-05-11T18:44:21.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I set a flash variable in Next.js before a redirect?<p>Laravel in PHP made this easy with <a href="https://laravel.com/docs/9.x/session#flash-data" r... |
72,167,682 | Vuetify v-btn how to remove follow up slot span tag<p>I'm trying to <strong>remove the span tag</strong> which follow up in the <strong>v-btn component provided by Vuetify</strong>, that is <strong>getting in the way of tracking</strong> via HTML id attributes in analytics</p>
<p>Code provided below using UI component ... | <p>The <code>V-Btn</code> component have a <code>genContent</code> function implementation which will be invoked to generate the child elements while rendering the root component. By default it provides the following <a href="https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VBtn/VBtn.ts#... | Vuetify v-btn how to remove follow up slot span tag | vue.js|vuetify.js|vue-slot|v-btn | 0 | 135 | 1 | 72,168,117 | 72,168,117 | 3 | true | 2022-05-09T06:19:47.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vuetify v-btn how to remove follow up slot span tag<p>I'm trying to <strong>remove the span tag</strong> which follow up in the <strong>v-btn component provi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.