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,967,908 | Load testing with Jmeter and selenium plugin<p>I'm looking to perform a browser based load test on my application. I was looking this option to use selenium plugin with Jmeter. So that I can write the required UI flow with Selenium within Jmeter and parameterize using Jmeter options.</p>
<p>I've used Jmeter for http/ht... | <p>Theoretically yes but you will need to think about the hardware.</p>
<p>As per <a href="https://www.mozilla.org/en-US/firefox/102.0.1/system-requirements/" rel="nofollow noreferrer">Firefox 102 System Requirements</a> one browser instance needs:</p>
<ul>
<li>1 CPU core</li>
<li>2 GB of RAM</li>
</ul>
<p>so for 500 b... | Load testing with Jmeter and selenium plugin | selenium|jmeter|jmeter-plugins | 0 | 43 | 1 | 72,968,207 | 72,968,207 | 0 | true | 2022-07-13T14:22:03.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Load testing with Jmeter and selenium plugin<p>I'm looking to perform a browser based load test on my application. I was looking this option to use selenium ... |
72,966,956 | How to replace the color of a pixel in an image?<p>I have a function that can return the color of a pixel by points</p>
<pre><code>extension CGImage {
func colors(at: CGPoint) -> UIColor {
let colorSpace = CGColorSpaceCreateDeviceRGB()
let bytesPerPixel = 4
let bytesPerRow = bytesPerPixel * width
let... | <p>Depending on what all you want to do, this may or may not be the appropriate approach.</p>
<p>However, without additional information...</p>
<p>This func will set the pixel at <code>atPoint</code> to on <code>onImage</code> to <code>color</code>:</p>
<pre><code>func setColor(color: UIColor, onImage: UIImage, atPoin... | How to replace the color of a pixel in an image? | ios|swift|uicolor|cgimage | -1 | 43 | 1 | 72,969,126 | 72,969,126 | 0 | true | 2022-07-13T13:13:53.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace the color of a pixel in an image?<p>I have a function that can return the color of a pixel by points</p>
<pre><code>extension CGImage {
func c... |
72,969,604 | CREATE FUNCTION for "CleanFile" failed because T-SQL and CLR types for return value do not match<p>Been scratching my head with this one for a few hours. I've got a handful of CLR DLLs which work ok, but this most recent is giving me a few headaches. Any insight will be helpful.</p>
<p>I've tried several things, suc... | <p>I made copy/paste your code into new project in VS 2019, then registered assembly (permission_set=SAFE) on MSSQL 2019 - it works fine (in try block just returned some string).</p>
<p>Ensure that your assembly is created from latest and successfully compiled DLL.</p>
<p>If no success - give more details about what yo... | CREATE FUNCTION for "CleanFile" failed because T-SQL and CLR types for return value do not match | c#|tsql|clr | 0 | 43 | 2 | 72,972,103 | 72,972,103 | 0 | true | 2022-07-13T16:25:07.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CREATE FUNCTION for "CleanFile" failed because T-SQL and CLR types for return value do not match<p>Been scratching my head with this one for a few hours. I... |
72,771,476 | VsCode Extension custom CompletionItem disables built-in Intellisense<p>I am working on a VsCode extension in that I want to provide custom snippets for code completion.</p>
<p>I know about the option of using snippet json files directly, however those have the limitation of not being able to utilize the CompletionItem... | <p>I seem to have found the answer for my problem, so I will answer my question.</p>
<blockquote>
<p>Multiple providers can be registered for a language. In that case providers are sorted
<br>by their {@link languages.match score} and groups of equal score are sequentially asked for
<br>completion items. The process st... | VsCode Extension custom CompletionItem disables built-in Intellisense | visual-studio-code|vscode-extensions | 0 | 43 | 1 | 72,972,472 | 72,972,472 | 0 | true | 2022-06-27T11:39:36.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VsCode Extension custom CompletionItem disables built-in Intellisense<p>I am working on a VsCode extension in that I want to provide custom snippets for code... |
72,954,946 | .net core 3.1 MVC Partial View not showing inside main view<p>I cannot get the partial view to work properly inside another view.</p>
<p><strong>This is very important:
I am using a .NET core 3.1 MVC project</strong></p>
<p>Everything works, except:</p>
<ol>
<li>My main view can post the values to a PartialViewResult i... | <ol>
<li>Model Binding binds the property by name attribute.</li>
</ol>
<p>For example, your action contains <code>string phoneFromFileName</code>, but the front end does not contain such element with <code>name="phoneFromFileName"</code>, so it will always get null for parameter <code>phoneFromFileName</code... | .net core 3.1 MVC Partial View not showing inside main view | .net|asp.net-mvc|asp.net-core | 1 | 43 | 1 | 72,975,046 | 72,975,046 | 0 | true | 2022-07-12T15:38:28.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
.net core 3.1 MVC Partial View not showing inside main view<p>I cannot get the partial view to work properly inside another view.</p>
<p><strong>This is very... |
72,974,365 | CompletableFuture exception chaining<p>I want to wait for multiple events and decided to try to implement that with CompletableFuture.</p>
<pre><code>CompletableFuture a1 = new CompletableFuture();
CompletableFuture a2 = new CompletableFuture();
CompletableFuture a3 = new CompletableFuture();
CompletableFuture b = new ... | <p>According to the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html#allOf-java.util.concurrent.CompletableFuture...-" rel="nofollow noreferrer">docs</a> The CompleteableFuture created from the allOf method will complete when</p>
<blockquote>
<p>all of the given Completable... | CompletableFuture exception chaining | java | 1 | 43 | 1 | 72,975,746 | 72,975,746 | 0 | true | 2022-07-14T01:52:09.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CompletableFuture exception chaining<p>I want to wait for multiple events and decided to try to implement that with CompletableFuture.</p>
<pre><code>Complet... |
72,978,819 | AttributeError: 'Concatenate' object has no attribute 'compile'<pre><code>model_1 = Sequential()
model_1.add(Conv2D(3,kernel_size=(3,3), strides=(1),activation='relu',input_shape=(48,48,3),padding='same'))
model_1.add(Conv2D(3,kernel_size=(7,1), strides=(1), activation='relu',padding='same'))
model_1.add(Conv2D(3,kerne... | <p>The problem is that, you <strong>can't</strong> concatenate <code>tf.keras.models.Model</code> objects together. It's not something defined for models, but only for <code>tf.keras.layers.Layer</code> objects.</p>
<p>When such operations are involved in a model (e.g. concatenation of outputs), it's best to use the <c... | AttributeError: 'Concatenate' object has no attribute 'compile' | python|keras|concatenation | -1 | 43 | 1 | 72,979,781 | 72,979,781 | 0 | true | 2022-07-14T10:10:53.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AttributeError: 'Concatenate' object has no attribute 'compile'<pre><code>model_1 = Sequential()
model_1.add(Conv2D(3,kernel_size=(3,3), strides=(1),activati... |
72,977,677 | I want to automatically ionchange in ion-checkbox trigger<p>I made a check box that I can select from the list using the method below.</p>
<p>component.html</p>
<pre><code> <td class="td"> //The area of the check box.
<ion-checkbox
[(ngModel)]="data.isChecked"
(ionChange)=&... | <p>I don't know how your list is formated but as you want all checkbox to be checked at the start :</p>
<ul>
<li>you can use *ngFor to display your data</li>
<li>you format your data with a isChecked value (true for the start)</li>
<li>you can still use and adapt your logic with your event listener</li>
</ul>
<p><stron... | I want to automatically ionchange in ion-checkbox trigger | angular|typescript|ionic-framework | 0 | 43 | 1 | 72,980,589 | 72,980,589 | 0 | true | 2022-07-14T08:40:56.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to automatically ionchange in ion-checkbox trigger<p>I made a check box that I can select from the list using the method below.</p>
<p>component.html<... |
72,954,329 | Git Push command fails in git lab pipeline<p>I have created a pipeline to tag and push the commit, I am getting access denied when I push the code to remote origin from the gitlab job.</p>
<p>Note: The script is working fine in the local machine.</p>
<pre><code> - Pushing release to origin
remote: You are not allowed t... | <p>I have removed the existing origin settings using
<code>git remote rm origin</code></p>
<p>then added the remote origin with the project access tokens.</p>
<pre><code>git remote add origin https://<access-token-name>:<access-token>@gitlab.com/username/reponame.git
</code></pre>
<p>added the personal acc... | Git Push command fails in git lab pipeline | github|gitlab|gitlab-pipelines | -1 | 43 | 2 | 72,981,019 | 72,981,019 | 0 | true | 2022-07-12T14:53:27.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Git Push command fails in git lab pipeline<p>I have created a pipeline to tag and push the commit, I am getting access denied when I push the code to remote ... |
72,982,104 | how to update input defaultvalue using useRef (after the initial render?)<pre class="lang-js prettyprint-override"><code>
const Component = ()=>{
const [list, setList] = useState(getLocalStorage());
const [isEditing, setIsEditing] = useState(false);
const [itemToEdit, setItemToEdit] = useState();
const refContainer ... | <p>The defaultValue property <strong>only works for inicial rendering</strong>, that is the reason that your desired behavior works one time and then stops. See a similar question here: <a href="https://stackoverflow.com/questions/30146105/react-input-defaultvalue-doesnt-update-with-state">React input defaultValue does... | how to update input defaultvalue using useRef (after the initial render?) | reactjs|input|default-value|use-ref|rerender | 0 | 43 | 1 | 72,982,370 | 72,982,370 | 0 | true | 2022-07-14T14:22:41.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to update input defaultvalue using useRef (after the initial render?)<pre class="lang-js prettyprint-override"><code>
const Component = ()=>{
const [l... |
72,983,415 | Map Object of Objects without knowing Object Key - React Native<p>I need to get "primarySprayCanRGB" and "primarySprayCanHighLightRGB" from each individual object in the object and add them to the array.
But I don't know the individual object keys. => The paint names are different.
I'm working in... | <p>you can do it like this</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const extractData = data => Object.values(data.paints).map(({primarySprayCan}) => [primarySpray... | Map Object of Objects without knowing Object Key - React Native | javascript|reactjs|arrays|json|react-native | 0 | 43 | 2 | 72,983,564 | 72,983,564 | 0 | true | 2022-07-14T15:55:33.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Map Object of Objects without knowing Object Key - React Native<p>I need to get "primarySprayCanRGB" and "primarySprayCanHighLightRGB" fr... |
72,978,957 | How to suppress JuMP from printing e.g., "Set parameter Method to value 2"?<p>I notice in the newer version of JuMP, after setting parameter info of solvers, this information is printed in the terminal. How can I suppress it?</p>
<pre><code>Set parameter Method to value 2
Set parameter Crossover to value 1
Set paramete... | <p>This is not coming from JuMP. It is a known bug in some versions of Gurobi, which prints even when <code>set_silent</code> is used</p>
<p>It might be fixed in the latest Gurobi release, but I haven't tried.</p> | How to suppress JuMP from printing e.g., "Set parameter Method to value 2"? | julia|julia-jump | 0 | 43 | 1 | 72,985,848 | 72,985,848 | 0 | true | 2022-07-14T10:21:11.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to suppress JuMP from printing e.g., "Set parameter Method to value 2"?<p>I notice in the newer version of JuMP, after setting parameter info of solvers,... |
72,955,277 | Adjust the relative positions of Venn diagram using R Venn.diagram package<p>I would like to draw a Venn Diagram using the R <code>Venn.digram</code> package. Here is my code.</p>
<pre><code>library(VennDiagram)
myCol2 <- brewer.pal(3, "Pastel2")
list1 <- c(1:179)
list2 <- c(171:224)
list3 <- c(1... | <p>Thanks Dominik Rafacz for introducing the <code>ggvenn</code> package. It works.</p>
<p>library(ggvenn)</p>
<pre><code>a <- list(list1 = c(1:179),
list2 = c(171:224),
list3 = c(1:17, 171, 172, 225:230))
ggvenn(a, c("list1", "list2", "list3"),show_percentage = F) ... | Adjust the relative positions of Venn diagram using R Venn.diagram package | r|venn-diagram | 0 | 43 | 1 | 72,988,092 | 72,988,092 | 0 | true | 2022-07-12T16:06:33.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adjust the relative positions of Venn diagram using R Venn.diagram package<p>I would like to draw a Venn Diagram using the R <code>Venn.digram</code> package... |
72,982,343 | codesign fails with errSecInternalComponent: unable to build chain to self-signed root for signer<p>I am trying to sign my app with <code>codesign</code>, but it fails with "errSecInternalComponent":</p>
<pre><code>❯ codesign --force --deep --sign "Apple Development: ..." my.app
Warning: unable to b... | <p>It turns out two certificates were missing:</p>
<ul>
<li><a href="https://developer.apple.com/certificationauthority/AppleWWDRCA.cer" rel="nofollow noreferrer">Apple Worldwide Developer Relations Certificate Authority</a></li>
<li><a href="https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer" rel="nofollow n... | codesign fails with errSecInternalComponent: unable to build chain to self-signed root for signer | macos|code-signing | 0 | 43 | 1 | 72,990,566 | 72,990,566 | 0 | true | 2022-07-14T14:39:10.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
codesign fails with errSecInternalComponent: unable to build chain to self-signed root for signer<p>I am trying to sign my app with <code>codesign</code>, bu... |
72,988,670 | Editing several excel files before after iterating through path folder - python<p>I'm working on editing several Excel files at once and when it comes time to iterate through all of my folders, it is only capable of doing so for the first .xlsx file.</p>
<pre class="lang-py prettyprint-override"><code>def sumOfCosts():... | <p>You have your return statement on the same indent level as the '<strong>if file.endswith(".xlsx"):</strong>' so regardless of the statements in the if condition being executed the 'return' statement will be on the first 'file'.<br>
To keep iterating thru the files move the 'return' to be level with the lin... | Editing several excel files before after iterating through path folder - python | python|openpyxl | -1 | 43 | 1 | 72,991,106 | 72,991,106 | 0 | true | 2022-07-15T03:11:01.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Editing several excel files before after iterating through path folder - python<p>I'm working on editing several Excel files at once and when it comes time t... |
72,910,888 | How to disable MD5 signature for Android apk?<p>when trying to upload our apk to our Mobile Device Management I get an error saying that "Apps signed with MD5 are not supported anymore".</p>
<p>I am not sure about the signing process. How do I disable MD5 signing?</p>
<p>Greetings</p> | <p>I solved it by creating a new project and cloning my code into it. There appears to have been something wrong with Android Studio configurations.</p> | How to disable MD5 signature for Android apk? | android|gradle|apk|md5|signing | 0 | 43 | 1 | 72,991,757 | 72,991,757 | 0 | true | 2022-07-08T11:43:32.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to disable MD5 signature for Android apk?<p>when trying to upload our apk to our Mobile Device Management I get an error saying that "Apps signed wi... |
72,992,056 | Unity: Creating a gameobject list for a puzzle game<p>I need help with a difficulty I have with lists.
Basically I need a code that allows me to check a list of game objects, there are 4 in all, which are destroyed by the player when the player interacts, allowing the player to exit the level.
Thank you in advance that... | <p>If I understand you correctly what you have is</p>
<pre><code>public List<GameObject> theList;
</code></pre>
<p>and now you want to check if all of the items in this list have been destroyed / there is any item in the list which is not destroyed yet.</p>
<p>You can either use a simple loop like e.g.</p>
<pre><... | Unity: Creating a gameobject list for a puzzle game | c#|unity3d | -2 | 43 | 1 | 72,992,204 | 72,992,204 | 0 | true | 2022-07-15T09:43:06.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unity: Creating a gameobject list for a puzzle game<p>I need help with a difficulty I have with lists.
Basically I need a code that allows me to check a list... |
72,993,368 | ruby on rails parsing variable to function<p>Can someone tell me difference between theese two code examples? What changes when putting ":" at the end of variable name?</p>
<pre><code>def initialize(email:)
@email = email
end
</code></pre>
<pre><code>def initialize(email)
@email = email
end
</code></pre> | <p><code>email:</code> in the method definition argument means that the method will be expecting a key-value pair as the method arguments.
Sample initialization call:</p>
<pre><code>YourClass.new(email: email_param)
</code></pre>
<p>while a simple <code>email</code> in the method definition argument means that the meth... | ruby on rails parsing variable to function | ruby-on-rails|ruby | 0 | 43 | 2 | 72,993,996 | 72,993,996 | 0 | true | 2022-07-15T11:36:11.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ruby on rails parsing variable to function<p>Can someone tell me difference between theese two code examples? What changes when putting ":" at the ... |
72,998,966 | RL reward function with unknown range<p>For the sake of the argument, let's say that I am trying to minimize a number of mathematical functions using Reinforcement Learning, where the minimum can essentially lie anywhere between -inf and +inf. (I know that RL would probably not be the most suitable algorithm, but this ... | <p>Predicting a distribution with limited information is always complicated. To improve your prediction I have an idea that might help or not:
Optimize two models:
One is rewarded for fulfilling the task with scaled rewards predicted with the values encountered so far.
The other is optimzed towards a policy, that is re... | RL reward function with unknown range | machine-learning|mathematical-optimization|reinforcement-learning|reward | -1 | 43 | 2 | 72,999,819 | 72,999,819 | 0 | true | 2022-07-15T19:47:55.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RL reward function with unknown range<p>For the sake of the argument, let's say that I am trying to minimize a number of mathematical functions using Reinfor... |
73,000,225 | Why can't I substitute non-sympy-native functions with abstract functions? [solved]<p>This is part of my larger project where I created an Artificial Calculus Teacher.
The only part that breaks is when I try to express composite functions.</p>
<p><a href="https://github.com/NSC9/Sample_of_Work/blob/Main/Personal_Projec... | <p>You can replace <code>f</code> in <code>f(x)</code> with <code>cos</code> but not <code>cos(x)</code> -- your call for a random function is not returning a random unapplied function, it is returning an applied function (the latter, like <code>cos(x)</code>. Then, subs works for most of them, but <code>replace</code>... | Why can't I substitute non-sympy-native functions with abstract functions? [solved] | python|sympy | 0 | 43 | 1 | 73,000,728 | 73,000,728 | 0 | true | 2022-07-15T22:42:06.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't I substitute non-sympy-native functions with abstract functions? [solved]<p>This is part of my larger project where I created an Artificial Calculu... |
72,995,285 | React renders JSX elements incomplete - recursive render<p>I have a pretty specific case where my react component renders only a part of what is returned by the code.</p>
<p><strong>General Idea:</strong> <br />
I have a multidimentsional array: <br />
Rows and Columns [][] of a not specified size, starting with 1 pred... | <p>What you need here is the predefined prop called <code>children</code>.</p>
<p>When you wrap your elements as below,</p>
<pre><code><Row key={"Row" + rowIndex}>{mapColumns(row, rowIndex)}</Row>
</code></pre>
<p>then your <code>Row</code> component gets a prop with all the child elements in a pr... | React renders JSX elements incomplete - recursive render | reactjs|multidimensional-array|jsx|conditional-rendering | 1 | 43 | 1 | 73,001,652 | 73,001,652 | 0 | true | 2022-07-15T14:08:10.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React renders JSX elements incomplete - recursive render<p>I have a pretty specific case where my react component renders only a part of what is returned by ... |
72,949,831 | Laravel using a different users table returns 419 page expired<p>I am attempting to use a different user table for authentication on my Laravel project the idea is to have the default user table and a members table both have email and password fields on it.</p>
<p>here is my config/auth.php</p>
<pre><code>'guards' =>... | <p>The reason why it shows 419 page because of the middleware route protection so i just added to my routes.</p>
<p>from</p>
<pre><code>Route::get('/dashboard', [HomeController:: class, 'dashboard'])->middleware('auth');
</code></pre>
<p>to</p>
<pre><code>Route::group(['middleware' => ['auth:web,members'] ], fun... | Laravel using a different users table returns 419 page expired | php|laravel | 0 | 43 | 1 | 73,002,611 | 73,002,611 | 0 | true | 2022-07-12T09:14:14.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel using a different users table returns 419 page expired<p>I am attempting to use a different user table for authentication on my Laravel project the i... |
73,003,962 | Increment Last Id from String in python Django<p>I am trying to generate an auto-increment number as an ID with Company Label. Company Labels will be changing for every user. So I cant use slicing here.</p>
<blockquote>
<p>My ID is like TES-PRODUCT-01</p>
</blockquote>
<p>TES is a company label
PRODUCT is as it is name... | <p>You can simply use "f-strings"</p>
<pre><code>total_stock = New_Stock_Entry.objects.all().count() + 1
latest_item_code=f"TES-PRODUCT-{total_stock}"
</code></pre> | Increment Last Id from String in python Django | python|django|object|django-queryset|auto-increment | 0 | 43 | 1 | 73,004,106 | 73,004,106 | 0 | true | 2022-07-16T11:53:12.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Increment Last Id from String in python Django<p>I am trying to generate an auto-increment number as an ID with Company Label. Company Labels will be changin... |
73,005,006 | How to jump into a method from switch statement in c#?<p>how to jump to a method from the switch-case statement?</p>
<p>for example:</p>
<p>in the switch statement there is a case, and if it is that case matched, you will jump to a method that given at the codeblock of a case. Is there any way to do that?</p> | <p>Not sure if I got your question right, but a switch statement will execute everything below the case that matches. Example:</p>
<pre><code>switch (myIntVar)
{
case 1:
//Code for when myIntVar equals 1
break;
case 2:
//Code for when myIntVar equals 2
break;
default:
//Code for when myIntVar has any other value
brea... | How to jump into a method from switch statement in c#? | c# | -1 | 43 | 1 | 73,005,157 | 73,005,157 | 0 | true | 2022-07-16T14:29:17.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to jump into a method from switch statement in c#?<p>how to jump to a method from the switch-case statement?</p>
<p>for example:</p>
<p>in the switch sta... |
73,005,722 | Assigning a slice of struct<p>I am trying to represent a slice data as json format so that I can use this <a href="https://marketplace.visualstudio.com/items?itemName=hediet.debug-visualizer" rel="nofollow noreferrer">vs-code-extension</a>.</p>
<p>But I am getting error in the last line of the for loop.</p>
<p><strong>... | <p>After doing certain changes to the code, following code works fine now.
But I am still not able to get the visualizations from <a href="https://marketplace.visualstudio.com/items?itemName=hediet.debug-visualizer" rel="nofollow noreferrer">this vs-code-extension.</a></p>
<pre><code>type ColumnStructure struct {
C... | Assigning a slice of struct | go|struct|initialization|slice|variable-assignment | 0 | 43 | 1 | 73,005,829 | 73,005,829 | 0 | true | 2022-07-16T16:02:35.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Assigning a slice of struct<p>I am trying to represent a slice data as json format so that I can use this <a href="https://marketplace.visualstudio.com/items... |
72,991,989 | My web service operation call only opens test page in IIS - I am not sure how to call the operation to return my xml<p>I am new to web services.</p>
<p>I have built a web service in C# that consumes a third party service and then returns the XML response from that call in a web method.</p>
<p>When I test this in IIS on... | <p>You call the service by making a POST request with a properly formated SOAP message to this URL:</p>
<pre><code><path>/WebService.asmx
</code></pre>
<p>You get the WSDL of the web service by making a GET request to this URL:</p>
<pre><code><path>/WebService.asmx?wsdl
</code></pre>
<p>You can use that WSD... | My web service operation call only opens test page in IIS - I am not sure how to call the operation to return my xml | c#|xml|web-services|web|soap | 0 | 43 | 1 | 73,006,996 | 73,006,996 | 0 | true | 2022-07-15T09:37:32.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
My web service operation call only opens test page in IIS - I am not sure how to call the operation to return my xml<p>I am new to web services.</p>
<p>I hav... |
72,772,965 | Presenting Serverless Microservices<p>I've used microservice architecture for years. I've also used serverless functions for years. But I've never found a neat was to <em>present</em> groups of serverless functions as microservices.</p>
<p><strong>Server based approach</strong></p>
<p>I'm a big fan of presenting HTTP... | <p>My phone buzzed this morning and <a href="https://medium.com/aws-serverless-microservices-with-patterns-best/aws-event-driven-serverless-microservices-using-aws-lambda-api-gateway-eventbridge-sqs-dynamodb-a7f46220b738" rel="nofollow noreferrer">this Medium article</a> popped up.</p>
<p>Seems to validate the private ... | Presenting Serverless Microservices | aws-lambda|microservices|aws-api-gateway|openapi|api-gateway | 0 | 43 | 1 | 73,010,725 | 73,010,725 | 0 | true | 2022-06-27T13:30:42.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Presenting Serverless Microservices<p>I've used microservice architecture for years. I've also used serverless functions for years. But I've never found a ... |
72,997,553 | Why Next on Keras DictionaryIterator returns all the images and not just one?<p>I've been trying to understand this piece of code after using keras ImageDataGenerator and flow_from_directory:</p>
<p><strong>sample_training_images, _ = next(train_data_gen)</strong></p>
<p><strong>plotImages(sample_training_images[:5])</... | <p>It's because <code>next</code> function returns a <code>batch</code> of data. In the link you provided, the <code>batch size</code> is set to 128 hence it returns 128 images.</p>
<pre><code>sample_training_images, _ = next(train_data_gen) # returns 128 images
plotImages(sample_training_images[:5]) # selects the fi... | Why Next on Keras DictionaryIterator returns all the images and not just one? | keras|next|imagedatagenerator | 0 | 43 | 1 | 73,011,935 | 73,011,935 | 0 | true | 2022-07-15T17:11:55.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why Next on Keras DictionaryIterator returns all the images and not just one?<p>I've been trying to understand this piece of code after using keras ImageData... |
73,012,505 | How to fix FileNotFoundError?<p>I have encountered a problem while trying to open a .txt file from the same directory where my source code is located.
When I tried to open the file like this:</p>
<pre><code>with open("pi_digits.txt") as file_object:
contents = file_object.read()
print(contents)
</code... | <p>@Sottvogel</p>
<p>In general, a python instance can be run from many different directories in your computer. One way to check where the running instance is:</p>
<pre><code>import os
os.getcwd()
</code></pre>
<p>If you confirm that you are in the same directory of your file, try and see
what the following returns:</... | How to fix FileNotFoundError? | python | 1 | 43 | 3 | 73,012,576 | 73,012,576 | 0 | true | 2022-07-17T14:10:49.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix FileNotFoundError?<p>I have encountered a problem while trying to open a .txt file from the same directory where my source code is located.
When I... |
73,012,383 | Getting question marks using Python requests with Excel file<p>I'm new to Python3 and requests. I found a Dataset on <em>Harvard Dataverse</em> but I've been stuck for hours trying to extract the Dataset. Instead I get question marks in my content and no readable data. I found similar issues but I'm still unable to sol... | <p>It seems that the request URL is not giving valid json response instead it is returning the whole excel file that contains the dataset which you want.</p>
<p>Instead of directly accessing the response object you should first save the response in excel file 'dataset.xlsx' then try to access that excel file in order t... | Getting question marks using Python requests with Excel file | python|python-requests | 0 | 43 | 1 | 73,013,433 | 73,013,433 | 0 | true | 2022-07-17T13:54:57.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting question marks using Python requests with Excel file<p>I'm new to Python3 and requests. I found a Dataset on <em>Harvard Dataverse</em> but I've been... |
73,015,504 | Change button function at runtime in pyqt5<p>When the program starts running, I assign the CreateNew function to the btn_UpdateDelete button in the constructor function. But I want to replace it with UpdateFunc after the program starts running. When I click the Update button after the program starts running, the Create... | <p>Just like there is the <code>connect</code> method to assign signals to slots, there is a <code>disconnect</code> method that removes previously connected slots. So in your <code>CreateNew</code> method at the bottom you can disconnect the method from your signal and attach the UpdateFunc method as the new slot.</p... | Change button function at runtime in pyqt5 | python|python-3.x|user-interface|pyqt|pyqt5 | 1 | 43 | 1 | 73,017,153 | 73,017,153 | 0 | true | 2022-07-17T21:30:08.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change button function at runtime in pyqt5<p>When the program starts running, I assign the CreateNew function to the btn_UpdateDelete button in the construct... |
72,976,863 | How to reuse the coefficient obtained from scipy.interpolate.RectBivariateSpline.get_coeffs() to reconstruct the interpolation function?<p>I have a huge 3D (x,y,z) data set with (x,y) being the inputs and (z) is the output. Now the dataset is very large, and I need to use that information in real time with minimal dela... | <p>The solution is in the scipy official doc (<a href="https://docs.scipy.org/doc/scipy/tutorial/interpolate.html#spline-interpolation-in-1-d-procedural-interpolate-splxxx" rel="nofollow noreferrer">link</a>).</p>
<ul>
<li>Use <code>bisplrep</code> function (<em>rep</em> stands for representation) to obtain the interpo... | How to reuse the coefficient obtained from scipy.interpolate.RectBivariateSpline.get_coeffs() to reconstruct the interpolation function? | python|numpy|scipy|neural-network|interpolation | 0 | 43 | 1 | 73,018,169 | 73,018,169 | 0 | true | 2022-07-14T07:37:37.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reuse the coefficient obtained from scipy.interpolate.RectBivariateSpline.get_coeffs() to reconstruct the interpolation function?<p>I have a huge 3D (... |
73,007,384 | Cache same synthetic response for multiple requests with similar cache key at once<p>Trying to tackle a particular usecase with respect to caching mutliple requests at once</p>
<p>Example:</p>
<p>Request 1</p>
<ul>
<li>Client requests <a href="http://example.com/user/1/config?arg1=val1&arg2=val2&arg3=val3" rel=... | <p>The assumption I'm going to make is that a non-existent user should always be considered "not found", regardless of the query string parameters used. The output will always be an empty JSON object.</p>
<p>As soon as the user is found, query string parameters matter again.</p>
<p>I have a solution for that ... | Cache same synthetic response for multiple requests with similar cache key at once | varnish|varnish-vcl | 0 | 43 | 1 | 73,019,514 | 73,019,514 | 0 | true | 2022-07-16T20:16:17.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cache same synthetic response for multiple requests with similar cache key at once<p>Trying to tackle a particular usecase with respect to caching mutliple r... |
73,016,349 | Query takes long time to run on postgreSQL database despite creating an index<p>Using PostgreSQL 14.3.1, I have created a database instance that is now 1TB in size. The main userlogs table is 751GB in size with 525GB used for data and 226GB used for various indexes on this table. The userlogs table currently contains o... | <p>There is no possibilities to optimize such queries in PostGreSQL due to the internal structure of the data storage into rows inside pages.</p>
<p>All queries involving an aggregate in PostGreSQL such as COUNT, COUNT DISTINCT or DISTINCT must read all rows inside the table pages to produce the result.</p>
<p>Let'us t... | Query takes long time to run on postgreSQL database despite creating an index | postgresql|indexing|windows-server-2019 | 2 | 43 | 2 | 73,022,090 | 73,022,090 | 0 | true | 2022-07-18T00:46:09.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Query takes long time to run on postgreSQL database despite creating an index<p>Using PostgreSQL 14.3.1, I have created a database instance that is now 1TB i... |
73,022,507 | BeautifulSoup: find_all() returns one result when using for loop<p>I'm practicing web scraping using Beautiful Soup. But it turns out one result only. I checked soup.find_all. When I print out "items", it shows the whole list. However, when I add for loop function, it just shows one result. Please help me tha... | <p>You should add 'print' in the loop not out of that
better approach is pandas:</p>
<pre><code>main_list=[]
for start_scraping in items:
product_name = start_scraping.find('div', class_ = '_4rR01T').text
product_price = start_scraping.find('div', class_ = '_30jeq3 _1_WHN1').text
product_rating = start_scra... | BeautifulSoup: find_all() returns one result when using for loop | python|for-loop | -2 | 43 | 1 | 73,023,056 | 73,023,056 | 0 | true | 2022-07-18T12:45:09.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BeautifulSoup: find_all() returns one result when using for loop<p>I'm practicing web scraping using Beautiful Soup. But it turns out one result only. I chec... |
72,995,564 | Anypoint Studio 6.6.8 local run in debug mode calls monitor immediately and stop responding<p>I have a problem once updated AnyPoint Studio to 6.6.8 (was fine on 6.6.7) but not sure if that because of that or some setting I am missing.
So I have a project domain and dependent on one package, once I do run for debug, an... | <p>So, even if no answer so far where is a place to control that mysterious monitor behaviour, issue with immediately start was solved after completely deleted workspace and rebuild it on first run, now its acting as it should, hope it may help somebody so don't deleting my question.</p> | Anypoint Studio 6.6.8 local run in debug mode calls monitor immediately and stop responding | mule|anypoint-studio | 0 | 43 | 1 | 73,025,314 | 73,025,314 | 0 | true | 2022-07-15T14:28:26.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Anypoint Studio 6.6.8 local run in debug mode calls monitor immediately and stop responding<p>I have a problem once updated AnyPoint Studio to 6.6.8 (was fin... |
73,019,465 | Azure Media services, create locator fails using .NET library<p>An old V2 Media services account used to be working happily with the given code:</p>
<pre><code>var contentKeys = new List<StreamingLocatorContentKey>
{
new StreamingLocatorContentKey(
contentKeyId,
StreamingLocatorContentKeyType.... | <p>It will be easiest to debug the issue if you file a support ticket from Azure Portal with your media account information and request information.</p>
<p>Since you mention that getting rid of the <code>contentkeys</code> parameter fixes the <code>BadRequest</code>, it is possible that there is a mismatch between the ... | Azure Media services, create locator fails using .NET library | .net|azure-media-services | 0 | 43 | 1 | 73,026,653 | 73,026,653 | 0 | true | 2022-07-18T08:35:26.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure Media services, create locator fails using .NET library<p>An old V2 Media services account used to be working happily with the given code:</p>
<pre><co... |
73,027,289 | Struggling as to what I need to add into my code so that when the user enters a specific password they get a role (discord.js)<p>Hello here is my code currently, I can type any word or number phrase and it brings up a button which says enter password I click it and it brings up a modal, My issue is I can enter anything... | <pre class="lang-js prettyprint-override"><code> if (interaction.isModalSubmit()) {
if (interaction.customId === 'verification-modal') {
const response =
interaction.fields.getTextInputValue('verification-input');
if (response === "Correct answer") {
... | Struggling as to what I need to add into my code so that when the user enters a specific password they get a role (discord.js) | javascript|discord|discord.js | -2 | 43 | 1 | 73,027,433 | 73,027,433 | 0 | true | 2022-07-18T18:56:51.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Struggling as to what I need to add into my code so that when the user enters a specific password they get a role (discord.js)<p>Hello here is my code curren... |
73,029,226 | I'm can't return the balance of a bank account project<p>I can't access the get method to return balance and such. the program works but without the get method used. The interpreter just ignore.</p>
<pre class="lang-py prettyprint-override"><code>class Category:
def __init__(self, balance = 0):
self.balanc... | <p>There are a few places where your could use some improvement. I made some inline comments in the example below describing and one possible solution to your question.</p>
<pre><code>class Category:
# add 1 empty lines in between methods for readability
def __init__(self, balance = 0):
sel... | I'm can't return the balance of a bank account project | python|class | 1 | 43 | 1 | 73,029,404 | 73,029,404 | 0 | true | 2022-07-18T22:22:47.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm can't return the balance of a bank account project<p>I can't access the get method to return balance and such. the program works but without the get meth... |
73,030,551 | NavMesh Rigidbody navigation system stutters around corners<h2>Problem</h2>
<p>I have created a navigation system using Rigidbody and NavMesh. There is an agent that tries to follow me around. It has a capsule collider, a script (see below), a Rigidbody, and a NavMeshAgent component. It works by running the NavMesh cal... | <p>I have a big list of what the issues with the navmesh can be, hence I am posting it as an answer:</p>
<p>Open your navigation panel, if you can't find one or accidentally closed the tab, go to <strong>Window > AI > Navigation</strong>. The Navigation tab looks like this:</p>
<p><a href="https://i.stack.imgur.c... | NavMesh Rigidbody navigation system stutters around corners | c#|unity3d|path-finding|navmesh | 0 | 43 | 1 | 73,031,004 | 73,031,004 | 0 | true | 2022-07-19T02:43:07.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NavMesh Rigidbody navigation system stutters around corners<h2>Problem</h2>
<p>I have created a navigation system using Rigidbody and NavMesh. There is an ag... |
73,023,195 | Github Actions cannot find package.json in repo<p>I am using Github Actions for the first time and I am struggling to execute my whole workflow . This is my YAML so far:</p>
<pre><code>name: Deploy authn configuration to prod
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-late... | <p>You're running three different jobs which are dependent.</p>
<p>So, your yaml file should looks like below</p>
<pre class="lang-yaml prettyprint-override"><code>name: Deploy authn configuration to prod
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
-... | Github Actions cannot find package.json in repo | continuous-integration|github-actions | 0 | 43 | 1 | 73,032,666 | 73,032,666 | 0 | true | 2022-07-18T13:34:12.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Github Actions cannot find package.json in repo<p>I am using Github Actions for the first time and I am struggling to execute my whole workflow . This is my ... |
73,027,334 | Arg override error with Python slash testing framework and vscode Debugger<p>I am trying to debug slash testing framework test using vscode.</p>
<pre class="lang-py prettyprint-override"><code>slash run -o perf.ip=1.2.3.4 perf\test_perf.py -vvv
</code></pre>
<p>My launch.json looks as follows:</p>
<pre class="lang-json... | <p>Resolved. After adding the file name AFTER the <code>run</code> arg in the list, it works fine. Seems like running through the vscode debugger/launch, the args are position dependent.</p>
<pre class="lang-json prettyprint-override"><code>{
"version": "0.2.0",
"configurations": [... | Arg override error with Python slash testing framework and vscode Debugger | python|python-3.x|testing|visual-studio-code|vscode-debugger | 0 | 43 | 1 | 73,036,949 | 73,036,949 | 0 | true | 2022-07-18T19:00:57.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Arg override error with Python slash testing framework and vscode Debugger<p>I am trying to debug slash testing framework test using vscode.</p>
<pre class="... |
73,000,599 | React app can't reach my express app in production with its requests but works fine in development<p>I'm trying to send a simple get request to my express backend at the mywebsite.com/test route. The server should respond with {"test": "test"}. This works fine in development on localhost, but no mat... | <p>Solved. It turns out my issue was in my .htaccess file.</p>
<p>I understand I shouldn't use .htaccess if I have a VPS, but being quite new to dealing with a VPS, this was my issue:</p>
<pre><code><IfModule mod_rewrite.c>
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
... | React app can't reach my express app in production with its requests but works fine in development | javascript|node.js|reactjs|express|vps | 0 | 43 | 1 | 73,042,024 | 73,042,024 | 0 | true | 2022-07-16T00:00:22.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React app can't reach my express app in production with its requests but works fine in development<p>I'm trying to send a simple get request to my express ba... |
73,017,721 | React Router: Force actual render of library components after navigation (SPA)<p>I have a generic problem whereby whenever I add React Router into one of my React project it proceeds to break other libraries ability to render, typically being packages from NPM such as Apex Charts and JQuery's JVectorMap.</p>
<p>If I re... | <p>SOLVED: just use react wrappers for libraries that have them. In my case both Apex Charts and Jvectormap have solid wrappers written for React on npm. Now when I use them it can handle reloading on navigation just fine :)</p>
<p>I suspect this was in fact an issue with React (perhaps v18 strict mode) and not React R... | React Router: Force actual render of library components after navigation (SPA) | javascript|reactjs|react-router|apexcharts|jvectormap | 1 | 43 | 1 | 73,046,611 | 73,046,611 | 0 | true | 2022-07-18T05:36:33.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Router: Force actual render of library components after navigation (SPA)<p>I have a generic problem whereby whenever I add React Router into one of my ... |
72,950,056 | Error when trying to fit model - Tensorflow CNN<p>I'm trying to create a CNN for image classification (Cats & Dogs). Everything was working fine untill the moment I used fit. Since I am a beginner I fear I haven't correctly created my sequential model. I'm also not sure if my steps per epoch and validation steps ar... | <p>After a bit of research, I finally made it work in pyCharm as well. The problem was I hadn't used Flatten. Here is the piece of my code that I changed. It works fine now. I'm still not sure why it wouldn't give me an error in Colab though.</p>
<pre><code>model = Sequential(
[
keras.Input(shape=(IMG_WIDTH... | Error when trying to fit model - Tensorflow CNN | python-3.x|tensorflow|keras|deep-learning|conv-neural-network | 1 | 43 | 1 | 73,061,588 | 73,061,588 | 0 | true | 2022-07-12T09:29:06.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error when trying to fit model - Tensorflow CNN<p>I'm trying to create a CNN for image classification (Cats & Dogs). Everything was working fine untill t... |
72,992,722 | Change button value on ajax success<p>I want to be able to change the value of the button from "Submit" to "Submitted" when ajax succeeds.</p>
<pre><code>success: function () {
Swal.fire({
title: "Message recieved!",
text: "We will get back to you soon.",
ic... | <p>For anyone wondering,
I couldn't get <code>$('#ID').html('Submitted')</code> to work.
<br>Instead the following worked np:
<br></p>
<pre><code>success: function () {
Swal.fire({
title: "Message recieved!",
text: "We will get back to you soon.",
icon: "success",
... | Change button value on ajax success | javascript|jquery|ajax|button|onclick | 1 | 43 | 1 | 73,078,333 | 73,078,333 | 0 | true | 2022-07-15T10:39:01.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change button value on ajax success<p>I want to be able to change the value of the button from "Submit" to "Submitted" when ajax succeeds... |
72,939,151 | Navbar not updating upon pressing the logout button, only after refreshing the page<p>I'm trying to use useContext as a global state manager. The user logout does indeed work but the information on the Navbar does not reflect this change until I hit refresh. Why it's not updating the Navbar in particular is beyond me a... | <p>There is no way for all the related components to know the variable "user" has changed at any given moment because "user" is not a state. Right now, react renders your components through a 'static' and to its knowledge 'never changing variable' which explains why the view renders correctly only ... | Navbar not updating upon pressing the logout button, only after refreshing the page | javascript|reactjs | 0 | 43 | 1 | 72,940,001 | 72,940,001 | 0 | true | 2022-07-11T13:12:10.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Navbar not updating upon pressing the logout button, only after refreshing the page<p>I'm trying to use useContext as a global state manager. The user logout... |
72,346,262 | ArcGIS Pro SDK: Programmatically toggle whether a layer is editable or not<p>I was wondering if anyone would know how to toggle whether a layer is editable or not.</p>
<p>I am building a custom Add-in and would like a way to make a layer editable or uneditable based on layer name.</p> | <p>Found out it was quite simple in the end had to use 'SetEditable' method from layer.</p>
<pre><code>fl.SetEditable(true);
</code></pre> | ArcGIS Pro SDK: Programmatically toggle whether a layer is editable or not | arcgis | -2 | 43 | 1 | 72,646,146 | 72,646,146 | 0 | true | 2022-05-23T09:32:33.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ArcGIS Pro SDK: Programmatically toggle whether a layer is editable or not<p>I was wondering if anyone would know how to toggle whether a layer is editable o... |
72,799,844 | Splicing JSON object from array<p>I have tried splicing my json file using a for loop
JSON file:</p>
<pre><code>[
{
"name":"Billy Jean",
"age":"52",
"sex":"F",
},
{
"name":"Bob Semple",
"age":... | <p>You can create a new array using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter" rel="nofollow noreferrer">Array.prototype.filter()</a> combined with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment" ... | Splicing JSON object from array | javascript|json|object|splice | 1 | 43 | 1 | 72,799,909 | 72,799,909 | 0 | true | 2022-06-29T10:29:19.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Splicing JSON object from array<p>I have tried splicing my json file using a for loop
JSON file:</p>
<pre><code>[
{
"name":"Billy Jean... |
72,851,478 | How to pass `self` to a function that takes `UnsafeMutableRawPointer?` in Swift?<p>I've bought a 3D 4K projector last year, and it uses DLP-Link technology, which requires an 120fps Left/Right alternating video stream for stereoscopy.</p>
<p>I'm writing a player in Swift for Mac using Core Video, and a function require... | <p>Use the <code>Unmanaged</code> class.</p>
<p>in <code>setup_displaylink()</code>:</p>
<pre><code> func setup_displaylink() -> Bool
{
var cvret: CVReturn
cvret = CVDisplayLinkCreateWithActiveCGDisplays(&vlink)
if( vlink == nil ) { return false }
var me: ... | How to pass `self` to a function that takes `UnsafeMutableRawPointer?` in Swift? | swift|pointers | 0 | 43 | 1 | 72,852,145 | 72,852,145 | 0 | true | 2022-07-04T03:26:39.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass `self` to a function that takes `UnsafeMutableRawPointer?` in Swift?<p>I've bought a 3D 4K projector last year, and it uses DLP-Link technology, ... |
73,029,136 | How to extract fields from a JSON file<p>I am new to coding in general but I'm trying to shift my attention to learning JAVA, JSON and JQ.</p>
<p>Having said this, I have created the following JSON file:</p>
<pre><code> {
"users":
[
{"Firstname": "Rolo",
"Lastname"... | <p>Couple of issues in the json you posted first:</p>
<ul>
<li>You need a comma after <code>"Lastname": "Vast"</code></li>
<li>You need to complete the object by closing <code>users</code> array (add a <code>]</code> at the end), and then closing the entire object (adding a <code>}</code> at the end... | How to extract fields from a JSON file | arrays|json|jq | 0 | 43 | 2 | 73,029,441 | 73,029,441 | 0 | true | 2022-07-18T22:12:11.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to extract fields from a JSON file<p>I am new to coding in general but I'm trying to shift my attention to learning JAVA, JSON and JQ.</p>
<p>Having said... |
72,866,641 | Black background appears after converting from Mat(OpenCV) to UIImage<p>I have an application that uses some functions of the OpenCV library to edit images.
After converting UIImage to Mat and Mat to UIImage I get a black background in the image
please tell me how to fix it</p>
<p>my code which i use to convert UIImage... | <p>Functionally functional, no reproduction issues.
Because of a hint, I adjusted kCGImageAlphaNoneSkipLast|kCGBitmapByteOrderDefault to kCGBitmapByteOrder32Big | kCGImageAlphaPremultipliedLast</p>
<p>kCGImageAlphaNone|kCGBitmapByteOrderDefault to
kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedLast</p> | Black background appears after converting from Mat(OpenCV) to UIImage | c++|ios|objective-c|opencv | 0 | 43 | 1 | 72,898,110 | 72,898,110 | 0 | true | 2022-07-05T08:57:54.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Black background appears after converting from Mat(OpenCV) to UIImage<p>I have an application that uses some functions of the OpenCV library to edit images.
... |
72,985,910 | How can i correctly use filter and map in the reducers folder for the workouts objects?<p>I am trying to make the correct delete and update requests for the workout object an I get an error that says the filter is not a function as I am using it on an object and not on an array. Below is the code that I am using for th... | <p>Since your <code>action.payload</code> is an object when the case is <code>'FETCH_ALL'</code>, your state becomes an object and you are not able to use array methods. Convert your object into an array, then return it.</p>
<pre><code>export default (workouts = [], action) {
switch (action.type) {
case 'FETCH_AL... | How can i correctly use filter and map in the reducers folder for the workouts objects? | javascript|node.js|reactjs|redux|redux-reducers | 0 | 43 | 1 | 72,986,372 | 72,986,372 | 0 | true | 2022-07-14T19:46:41.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i correctly use filter and map in the reducers folder for the workouts objects?<p>I am trying to make the correct delete and update requests for the ... |
72,875,586 | Why wont the terminal show me the values for x and y even though ive set them<p>I just started learning Python and i just cant figure out what the problem is tbh...</p>
<pre><code>import random
import itertools
def playagain():
playagain = input('Would you like to play again? Write YES or NO: ')
if play... | <p>Replace this line:</p>
<pre><code>guess = int(input('add these numbers '),print(x,y))
</code></pre>
<p>with:</p>
<pre><code>guess = int(input('add these numbers: ' + str(x) + ' and ' + str(y)))
</code></pre>
<p>I'm guessing that what you tried to do, was to add the values of <code>x</code> and <code>y</code> to the ... | Why wont the terminal show me the values for x and y even though ive set them | python | -1 | 43 | 1 | 72,875,811 | 72,875,811 | 0 | true | 2022-07-05T21:11:33.697Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why wont the terminal show me the values for x and y even though ive set them<p>I just started learning Python and i just cant figure out what the problem is... |
72,984,005 | Rendering Flask JSON response in ReactJs<p>So, I've been struggling with this and couldn't really find a solution. I have a Flask backend that does some operations and returns a JSON response like so</p>
<p>server.py</p>
<pre><code>from flask import Flask
from pyresparser import ResumeParser
app = Flask(__name__)
# ... | <p><em>Effects let you run some code after rendering so that you can synchronize your component with some system outside of React</em></p>
<p>So basically, when your code will run for the first time, the code inside useEffect won't run. Using something like this, you can have a fallback render until your data loads.</p... | Rendering Flask JSON response in ReactJs | javascript|reactjs|json | -2 | 43 | 2 | 72,984,542 | 72,984,542 | 0 | true | 2022-07-14T16:45:00.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rendering Flask JSON response in ReactJs<p>So, I've been struggling with this and couldn't really find a solution. I have a Flask backend that does some oper... |
72,867,969 | How to get the body of the table using Python?<p>I am self-lerning webscraping and I am trying to get tbody from a table with beautifulSoups.
My attempt:</p>
<pre><code>url ='https://www.agrolok.pl/notowania/notowania-cen-pszenicy.htm'
page = requests.get(url).content
soup = BeautifulSoup(page, 'lxml')
table = soup.fi... | <p><code>'table', class_='hover'</code> that contains table data aka tbody, tr, td and so on are dynamic thats why you are not getting <code>tbody</code> but you can mimic dat selenium with pandas/bs4. I use selenium with pandas.</p>
<p><strong>Script:</strong></p>
<pre><code>import time
import pandas as pd
from bs4 ... | How to get the body of the table using Python? | python|web-scraping|beautifulsoup|html-table | 1 | 43 | 3 | 72,869,183 | 72,869,183 | 0 | true | 2022-07-05T10:34:43.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the body of the table using Python?<p>I am self-lerning webscraping and I am trying to get tbody from a table with beautifulSoups.
My attempt:</p>... |
72,869,940 | Dart datetime parse why I'm getting wrong value?<p>I'm trying to parse a <code>DateTime</code> from a response of a JSON object</p>
<pre><code>print(DateTime.parse("2022-07-05T15:11:44+09:00"));
</code></pre>
<p>Getting output:</p>
<pre><code>2022-07-05 06:11:44.000Z
</code></pre>
<p>Desired output:</p>
<pre>... | <p>Try calling <a href="https://api.flutter.dev/flutter/dart-core/DateTime/toLocal.html" rel="nofollow noreferrer"><code>.toLocal()</code></a>:</p>
<pre class="lang-dart prettyprint-override"><code>void main() {
print(DateTime.parse('2022-07-05 06:11:44.000Z').toLocal());
}
</code></pre> | Dart datetime parse why I'm getting wrong value? | dart | 0 | 43 | 2 | 72,870,118 | 72,870,118 | 0 | true | 2022-07-05T13:03:33.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dart datetime parse why I'm getting wrong value?<p>I'm trying to parse a <code>DateTime</code> from a response of a JSON object</p>
<pre><code>print(DateTime... |
72,940,546 | The parameter 'id' can't have a value of 'null' because of its type<p>I am making a catalog app, I have to named the items but it's not working.</p>
<pre><code>class item {
final String id;
final String name;
final String desc;
final num price;
final String color;
final String image;
item({this.id, this.... | <p>Since you're using <em>named</em> arguments, the values can be null. You have to add the <code>required</code> keyword:</p>
<pre class="lang-dart prettyprint-override"><code>class item {
final String id;
final String name;
final String desc;
final num price;
final String color;
final String image;
ite... | The parameter 'id' can't have a value of 'null' because of its type | flutter|dart|dart-null-safety | 0 | 43 | 1 | 72,940,577 | 72,940,577 | 0 | true | 2022-07-11T14:56:59.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The parameter 'id' can't have a value of 'null' because of its type<p>I am making a catalog app, I have to named the items but it's not working.</p>
<pre><co... |
72,800,250 | I am going through Automate The Boring Stuff with Python and I'm stuck on an activity :- Read the emphasized text to read the activity<h2>Quoted Heading</h2>
<p>This is the exercise:-</p>
<blockquote>
<p>"Coin Flip Streaks For this exercise, we’ll try doing an experiment. If you flip a coin 100 times and write dow... | <p>First, you need to reset the number of heads and tails found to zero at the start of each experiment. Second, the exercise seems to be asking for the % of experiments which have 1 or more streak, whereas you are currently calculating the total number of streaks. The adjusted code below illustrates this.</p>
<pre><c... | I am going through Automate The Boring Stuff with Python and I'm stuck on an activity :- Read the emphasized text to read the activity | python | -2 | 43 | 1 | 72,800,481 | 72,800,481 | 0 | true | 2022-06-29T10:59:44.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I am going through Automate The Boring Stuff with Python and I'm stuck on an activity :- Read the emphasized text to read the activity<h2>Quoted Heading</h2>... |
72,965,510 | How can I find the sw-context-token while registering using js?<p>how can I find the sw-context-token while registering using js?</p>
<p><a href="https://i.stack.imgur.com/nbHBd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nbHBd.png" alt="enter image description here" /></a></p> | <p>For the registration request, you can leave the <code>sw-context-token</code> header empty.</p>
<p>In the response, you'll be provided with the <code>sw-context-token</code> header which you have to use for later requests that require this header to be set.</p>
<p>For further reference see the documentation:</p>
<ul... | How can I find the sw-context-token while registering using js? | react-native|shopware | 0 | 43 | 1 | 72,971,403 | 72,971,403 | 0 | true | 2022-07-13T11:29:25.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I find the sw-context-token while registering using js?<p>how can I find the sw-context-token while registering using js?</p>
<p><a href="https://i.s... |
72,813,646 | how to create vuetify like chip group with only html and css<p>How to create chip groups like <a href="https://vuetifyjs.com/en/components/chip-groups/#filter-results" rel="nofollow noreferrer">vuetify</a> with only html and css?<br />
I tried but unable to do it</p>
<p>like this:
<a href="https://i.stack.imgur.com/oed... | <p>First, you have to remove the checkbox default style. then style the span of the chip, and finally use the <code>+</code> css selector to style every <code>span</code> of chip that is placed immediately after a checked chip to style its checked behavior.</p>
<p><div class="snippet" data-lang="js" data-hide="false" ... | how to create vuetify like chip group with only html and css | html|css | 0 | 43 | 1 | 72,813,986 | 72,813,986 | 0 | true | 2022-06-30T09:46:52.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to create vuetify like chip group with only html and css<p>How to create chip groups like <a href="https://vuetifyjs.com/en/components/chip-groups/#filte... |
72,891,552 | why I cant send and recv integers in a loop correctly<p>I have the following code in my server program:</p>
<pre><code>void sendAccounts(const Database& data, int socket, int32_t user)
{
std::vector<int32_t> accounts = data.getUsersAccounts(user);
uint16_t number = accounts.size();
number = htons(num... | <p>In the <code>recv()</code> loop, you are casting the <em>value</em> of <code>account</code>, which is always 0, thus producing a null pointer. This is the main reason why <code>recv()</code> is failing.</p>
<p>You need to instead cast the <em>address</em> of <code>account</code> (just as you did with <code>n_account... | why I cant send and recv integers in a loop correctly | c++|sockets | 0 | 43 | 1 | 72,892,221 | 72,892,221 | 0 | true | 2022-07-07T02:06:13.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why I cant send and recv integers in a loop correctly<p>I have the following code in my server program:</p>
<pre><code>void sendAccounts(const Database& ... |
73,023,501 | JS code breaks HTML checkbox element functionality<p>I have a custom select list which I did with checkbox and label elements.
Then I added a little JS script that changes options on click.
It works perfectly, except you can't close it on click outside of it or its child elements.
I tried to use event listener(commente... | <p>Your strategy uses css to style the state of the dropdown based on the radio option value.</p>
<p>So there's no event handler in place already catching that point in time and the only approach to close the dropdown when you click outside, was using a click event handler on the main document and check for the element... | JS code breaks HTML checkbox element functionality | javascript|html|css | 0 | 43 | 1 | 73,023,887 | 73,023,887 | 0 | true | 2022-07-18T13:54:49.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JS code breaks HTML checkbox element functionality<p>I have a custom select list which I did with checkbox and label elements.
Then I added a little JS scrip... |
72,841,767 | Error("No Sequelize instance passed") No Sequelize instance passed<p>Hello can somebody help me with this ? I was doing my controllers and I can access to my model like this "const { User } = require("../models/User");" but than when I send my request I had this message "TypeError: Cannot read... | <p>The answer was that on my model user the "S" of sequelize must have an s minus</p> | Error("No Sequelize instance passed") No Sequelize instance passed | node.js|sequelize.js | 0 | 43 | 1 | 72,841,836 | 72,841,836 | 0 | true | 2022-07-02T19:05:09.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error("No Sequelize instance passed") No Sequelize instance passed<p>Hello can somebody help me with this ? I was doing my controllers and I can access to my... |
72,869,519 | Save data under same uid Firebase swift<p>I have added some data to the Firebase Realtime Database. It's in two parts, users and bookings. My problem is that when a user books a ride it gives a different uid, I would like it to be when a user books a ride it is under the same uid. Also, if the switch is on I would like... | <p>I believe the question is how to add additional data to a node.</p>
<p>The important bit is to keep a reference to the node you want to write to and use it with <code>update</code> to add/change existing data. If <code>update</code> is used on a node that doesn't exist, it will be added.</p>
<p>So here's an example.... | Save data under same uid Firebase swift | swift|xcode|firebase|firebase-realtime-database | 0 | 43 | 1 | 72,902,464 | 72,902,464 | 0 | true | 2022-07-05T12:34:04.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Save data under same uid Firebase swift<p>I have added some data to the Firebase Realtime Database. It's in two parts, users and bookings. My problem is that... |
72,850,850 | Using a void* as a buffer to store uint_32 variables acting as RAM memory. How to read and write to it?<p>The issue I'm having is for a project that is simulating RAM memory using a void* that is allocated N number of bytes. Always multiples of 4.
One of the requirements is that is <strong>has</strong> to use a void*, ... | <p>mem and test1 are already the pointers the destination and source buffer, so do this</p>
<pre><code>memcpy(mem, test1, sizeof(uint32_t));
</code></pre> | Using a void* as a buffer to store uint_32 variables acting as RAM memory. How to read and write to it? | c|pointers|buffer | 0 | 43 | 1 | 72,850,861 | 72,850,861 | 0 | true | 2022-07-04T00:51:54.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using a void* as a buffer to store uint_32 variables acting as RAM memory. How to read and write to it?<p>The issue I'm having is for a project that is simul... |
72,849,070 | How can I align three box in same line using flexbox in css?<p>In my project, I want to design a shipping address design with HTML and css(flexbox). And i want to design "city","zip code","state", box in one line like this <a href="https://i.stack.imgur.com/yS3Fh.png" rel="nofollow norefe... | <ol>
<li>You have many borders included which are a mess to take into account. The easiest and cleanest solution is to use <code>* { box-sizing: border-box; }</code>. With that property, we don't have to take all the different borders into account.</li>
<li>You nested way too many Flexbox and used unnecessary div's. As... | How can I align three box in same line using flexbox in css? | html|css|flexbox | 0 | 43 | 2 | 72,849,260 | 72,849,260 | 0 | true | 2022-07-03T18:43:40.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I align three box in same line using flexbox in css?<p>In my project, I want to design a shipping address design with HTML and css(flexbox). And i wa... |
72,938,837 | I cannot show my data in a DataGrid with a ListView<p>I'm trying to fill a datagrid, but it doesn't work and I get this error:</p>
<blockquote>
<p>CS1922 The type SPSDataBlock cannot be initialized with a collections initializer because it is not System.Collections.IEnumerable</p>
</blockquote>
<p>Here is the code:</p>... | <p>I assume your SPSDatenbaustein contains all the properties you are trying to copy from another object in your new SPSDatenbaustein() call.</p>
<p>In that case it should look like more than this:</p>
<pre><code>items.Add(new SPSDatenbautein() {
All_processes = _sPSDatenbautein.All_processes,
Magnetis... | I cannot show my data in a DataGrid with a ListView | c#|listview|datagrid | -2 | 43 | 2 | 72,939,095 | 72,939,095 | 0 | true | 2022-07-11T12:46:09.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I cannot show my data in a DataGrid with a ListView<p>I'm trying to fill a datagrid, but it doesn't work and I get this error:</p>
<blockquote>
<p>CS1922 The... |
72,860,111 | I'm having a problem with kivy with threading<p>I'm working on a project that works in python with kivy and I'm having a problem with kivy with thread
"TypeError: Cannot create graphics instruction outside the main Kivy thread"
When I press the button, this error appears</p>
<pre><code> def ched(self):
... | <p>Your code:</p>
<pre><code>on_release:threading.Thread(target=root.down).start()
</code></pre>
<p>will run <code>root.down()</code> on a new thread (not the main thread). And that code will try to create a <code>MDDialog</code> and a <code>MDFlatButton</code> on that new thread, which is not allowed. If the <code>dow... | I'm having a problem with kivy with threading | python|kivy | 0 | 43 | 1 | 72,860,947 | 72,860,947 | 0 | true | 2022-07-04T17:12:20.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm having a problem with kivy with threading<p>I'm working on a project that works in python with kivy and I'm having a problem with kivy with thread
"... |
72,782,609 | Collection view doesn't update<p>I have 4 categories in segmented control. When i press on one of them collection view should show products in particular category. But instead of reusing cells and show only new items, collection view shows old items and in the end adds new cells with new items.</p>
<p>Where is proper p... | <p>Problem is here</p>
<pre><code>networkManager.loadProducts(category: category)
collectionView.reloadData()
</code></pre>
<p><code>loadProducts</code> is an asynchronous method , and reload of the collection occurs before the network data returns , so you need a completion</p>
<pre><code>func loadProducts(category:... | Collection view doesn't update | ios|swift|uicollectionview|uikit|uicollectionviewcell | 0 | 43 | 1 | 72,782,808 | 72,782,808 | 0 | true | 2022-06-28T07:51:48.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Collection view doesn't update<p>I have 4 categories in segmented control. When i press on one of them collection view should show products in particular cat... |
72,924,264 | What can i do, if Add-Migration doesnt work?<p>I have a project with a Data Directory what contains the Directories "Context" and "Entities". In the project level i tried out "Add-Migration Initial". I'm getting there a "Build started" and a "Build succeeded". But i hav... | <p>statement add-migration has a switch to specify out put directory.
it maybe has diffrence with your out put directory for do it use "add-migration [-OutputDir ]" with your address of your out put dictionary</p>
<p>For technical information, type: "get-help Add-Migration -full".</p> | What can i do, if Add-Migration doesnt work? | entity-framework-core|.net-6.0|winui-3 | 0 | 43 | 1 | 72,948,692 | 72,948,692 | 0 | true | 2022-07-09T20:02:33.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What can i do, if Add-Migration doesnt work?<p>I have a project with a Data Directory what contains the Directories "Context" and "Entities&qu... |
72,903,205 | How do I make it so this message gets sent a specific channel? (Discord.py)<p>I want the message to get sent to a specific channel</p>
<pre><code>async def on_message_edit(before, after):
await before.channel.send(
f'{before.author} edited a message.\n'
f'Before: {before.content}\n'
f'After:... | <p>To send a message in a specific channel you need first to fetch the choosed channel by using his id by using <code>get_channel()</code> like this:</p>
<pre class="lang-py prettyprint-override"><code>specificChannel = bot.get_channel(int(YOUR_CHANNEL_ID_HERE))
</code></pre>
<p>Then your event block should look like t... | How do I make it so this message gets sent a specific channel? (Discord.py) | discord.py | -1 | 43 | 2 | 72,904,466 | 72,904,466 | 0 | true | 2022-07-07T19:23:16.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I make it so this message gets sent a specific channel? (Discord.py)<p>I want the message to get sent to a specific channel</p>
<pre><code>async def o... |
72,825,011 | Populating prefillTabs before sending in nodejs SDK<p>How do we populate prefillTabs using docusign's nodejs sdk?
Here is the flow.I am failing at No. 5.</p>
<ol>
<li>Fetch data from the projects database.</li>
<li>Docusign authentication to get <strong>accountId</strong></li>
<li>Create envelope draft from template //... | <p>Here is a PreFill tabs <a href="https://apirequestbuilder.docusign.com/?eg=Prefill%20tabs" rel="nofollow noreferrer">live example via the API Request Builder</a> You can change the output language of the tool to the Node.SDK.</p>
<p>Here is a working example:</p>
<pre><code>#!/usr/bin/env node
// DocuSign API Reque... | Populating prefillTabs before sending in nodejs SDK | node.js|docusignapi | 0 | 43 | 1 | 72,875,329 | 72,875,329 | 0 | true | 2022-07-01T06:03:28.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Populating prefillTabs before sending in nodejs SDK<p>How do we populate prefillTabs using docusign's nodejs sdk?
Here is the flow.I am failing at No. 5.</p>... |
72,901,872 | Problem with .eq() when comparing dataframes<p>I'm trying to compare two dataframes (df and df2) using .eq(), but it gives me false. I'm sure about the values:</p>
<blockquote>
<p>print(df['ano'])<br>
0 2021<br>
Name: ano, dtype: int64</p>
</blockquote>
<blockquote>
<p>print(df2['ano'])<br>
0 2020<br>
1 2019... | <p>Solution:</p>
<pre>df = df.drop_duplicates()<br>
x = 0<br>
y = 0<br>
df = df.reset_index()<br>
df2 = df2.reset_index()<br>
while(x = len(df)):<br>
while(y = len(df2)):<br>
if((df.at[x, 'a'] == df2.at[y, 'a']) & (df.at[x, 'b'] == df2.at[y, 'b']) & (df.at[x, 'c'] == df2.at[y, 'c'])):<br>
print('... | Problem with .eq() when comparing dataframes | python-3.x|pandas|dataframe | 0 | 43 | 2 | 72,917,331 | 72,917,331 | 0 | true | 2022-07-07T17:13:06.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem with .eq() when comparing dataframes<p>I'm trying to compare two dataframes (df and df2) using .eq(), but it gives me false. I'm sure about the value... |
72,957,657 | How to explode feature vector to a column in PySpark Dataframe?<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>id</th>
<th>texts</th>
<th>vector</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>[a, b, c]</td>
<td>(3,[0,1,2],[1.0,1.0,1.0])</td>
</tr>
<tr>
<td>1</td>
<td>[a, b, c]</td>
<td>(3,[0,1... | <pre><code>from pyspark.sql.types import *
from pyspark.ml.linalg import Vectors, VectorUDT
from pyspark.sql.functions import *
def to_array_(v):
return v.toArray().tolist()
def to_vector_(v):
return Vectors.dense(v)
to_array = udf(lambda z: to_array_(z),ArrayType(DoubleType())) #watch your return type
to_vector... | How to explode feature vector to a column in PySpark Dataframe? | python|pyspark|apache-spark-sql|jupyter-notebook|rdd | 0 | 43 | 1 | 72,959,600 | 72,959,600 | 0 | true | 2022-07-12T19:48:16.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to explode feature vector to a column in PySpark Dataframe?<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>id</th>
<th>texts</th... |
72,973,979 | Django Query using Foreign Key<p>I'm starting to work with queries in django and I'm trying to replicate the results of a join in sql.</p>
<p>I have a two models that represent a parent (WaiverAdult) and a child (WaiverMinor). I would like to return the parent and child in the query set, so I can group them in a format... | <p>If you wish to access related objects, the best way is to prefetch them so you are not hitting the database again every time you want to access a related object. You can do this like so:</p>
<pre><code>waiver_adults = WaiverAdult.objects.all().prefetch_related('waiverminor_set').order_by('created')
</code></pre>
<p>... | Django Query using Foreign Key | python|django | 0 | 43 | 1 | 72,974,111 | 72,974,111 | 0 | true | 2022-07-14T00:22:34.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django Query using Foreign Key<p>I'm starting to work with queries in django and I'm trying to replicate the results of a join in sql.</p>
<p>I have a two mo... |
73,011,712 | How to extract class text based on the previous class text value?<p>I am scraping various information about multiple houses and the information on each house is not similar. To be consistent, I seek to extract the information value based on the class label. For example, I have the following below:</p>
<pre><code>proper... | <p>Assuming you like to store the information in a structured way e.g. <code>dict</code> you could use a generic approach to get all properties. <em>Provided that the property label to be used as the key occurs only once.</em></p>
<p>In case you like to create a <code>dataframe</code> or <code>csv</code> based on the r... | How to extract class text based on the previous class text value? | python|web-scraping|beautifulsoup|conditional-statements | 0 | 43 | 1 | 73,011,788 | 73,011,788 | 0 | true | 2022-07-17T12:18:07.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to extract class text based on the previous class text value?<p>I am scraping various information about multiple houses and the information on each house... |
72,925,070 | Postgresql how to select a value from multiple jsons inside a array on a jsonB column<p>I have this table</p>
<pre><code>create table <table_name>(attr jsonb)
</code></pre>
<p>And this is the data inside</p>
<pre><code>{
"rules": [
{
"id": "foo",
"name": &... | <p>You can use <code>jsonb_array_length</code> together with <code>generate_series</code> to get each name. Then use <code>string_agg</code> to aggregate list of names. Without plpgsql and with a single statement. (see <a href="https://dbfiddle.uk/?rdbms=postgres_14&fiddle=899a26077a3b526d9d2edfe038ed27d0" rel="nof... | Postgresql how to select a value from multiple jsons inside a array on a jsonB column | arrays|postgresql|jsonb | 2 | 43 | 2 | 72,932,985 | 72,932,985 | 0 | true | 2022-07-09T22:44:41.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Postgresql how to select a value from multiple jsons inside a array on a jsonB column<p>I have this table</p>
<pre><code>create table <table_name>(attr... |
72,797,603 | Want to remove attribute array in my response Laravel api<p>This is my code. I just want to remove attribute array from message because I’m not fetching error on my frontend on angular and andriod app.</p>
<pre><code>public function createCountry(Request $coun)
{
$validate = Validator::make($coun->all(), [
... | <p>If you're just looking to return the error messages without their keys, then you want to use the <a href="https://laravel.com/api/9.x/Illuminate/Support/MessageBag.html#method_all" rel="nofollow noreferrer"><code>all()</code></a> method available on the <a href="https://laravel.com/api/9.x/Illuminate/Support/Message... | Want to remove attribute array in my response Laravel api | json|laravel|api|response | 0 | 43 | 1 | 72,800,113 | 72,800,113 | 0 | true | 2022-06-29T07:45:22.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Want to remove attribute array in my response Laravel api<p>This is my code. I just want to remove attribute array from message because I’m not fetching erro... |
72,886,544 | second bat is not executed PowerShell script<p>the below bat files are being called by PowerShell script, however only bat1.bat is executed the others bat2.bat and last.bat are not being called</p>
<pre><code>#first bat
Start-Process "C:\bat1.bat" -Wait
#run second bat
Start-Process "C:\bat2.bat"... | <p>Try using this:</p>
<pre><code>Set-Location C:\temp
Start-Process .\bat1.bat -Wait
Write-Host "bat1.bat DONE"
Start-Process .\bat2.bat -Wait
Write-Host "bat2.bat DONE"
cmd /c .\last.bat
Write-Host "last.bat DONE"
</code></pre>
<p>I made the following .bat files:</p>
<p>bat1.bat</p>
<... | second bat is not executed PowerShell script | windows|powershell|batch-file|command-line|scripting | 0 | 43 | 2 | 72,905,666 | 72,905,666 | 0 | true | 2022-07-06T15:50:19.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
second bat is not executed PowerShell script<p>the below bat files are being called by PowerShell script, however only bat1.bat is executed the others bat2.b... |
72,821,317 | How to migrate modify a collections of object array in mongodb?<p>I have the following schema mongoose, but have a app in production with collections. This is a simplification of a much larger problem, reduced for better understanding.</p>
<p><strong>This is only a sample basic.</strong></p>
<pre><code>export const Lis... | <p>Maybe something like this:</p>
<pre><code>db.collection.update({},
[
{
$addFields: {
listaItemsIds: {
$map: {
input: "$listaItemsIds",
as: "id",
in: {
item: "$$id",
property1: 55,
property2: 75
}
}
}
}
}
],
{... | How to migrate modify a collections of object array in mongodb? | javascript|node.js|mongodb|database-migration|mongoose-schema | 0 | 43 | 1 | 72,821,456 | 72,821,456 | 0 | true | 2022-06-30T19:52:07.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to migrate modify a collections of object array in mongodb?<p>I have the following schema mongoose, but have a app in production with collections. This i... |
72,832,875 | Safe distribution of Spring based application<p>Im thinking about creating spring boot application that i would like to comercialize some day.</p>
<p>I planned to build a Jar that i would allow to download, and once client launched it locally and provided some license key, it becomes useable.</p>
<p>I have some doubts ... | <p>The short answer is that there is no way to prevent reverse engineering if someone can run the software on hardware that they control.</p>
<p>The only way to 100% prevent reverse engineering is to ONLY run the software on a platform that you control ... and that can prevent them from getting a copy of the executable... | Safe distribution of Spring based application | java|spring-boot|deployment|reverse-engineering|publishing | 0 | 43 | 1 | 72,839,509 | 72,839,509 | 0 | true | 2022-07-01T17:37:28.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Safe distribution of Spring based application<p>Im thinking about creating spring boot application that i would like to comercialize some day.</p>
<p>I plann... |
73,025,500 | sublime text 3 After clicking rename folder and entering the name, it is invalid after entering enter?<p>After clicking rename folder and entering the name, it is invalid after entering enter?</p>
<p>When I press enter it goes to the next line, unable to confirm the submission, the modification of the file directory/fi... | <p>In ST3, the behaviour of the <kbd>Enter</kbd> key in panels (e.g. the Find panel, the command palette, and the input panel and all other panels/inputs) was hard coded, but in ST4 it's not and instead <kbd>Enter</kbd> is bound to a command that triggers the action instead.</p>
<p>Overall, this means that everything i... | sublime text 3 After clicking rename folder and entering the name, it is invalid after entering enter? | sublimetext3|sublimetext|file-rename | 0 | 43 | 1 | 73,073,584 | 73,073,584 | 0 | true | 2022-07-18T16:16:16.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sublime text 3 After clicking rename folder and entering the name, it is invalid after entering enter?<p>After clicking rename folder and entering the name, ... |
72,910,524 | Julian Day time to military time - R<p>I want to convert the following JD time format to its intuitively interpretable military format ("%H:%M:%S"):</p>
<p><a href="https://i.stack.imgur.com/U85tP.png" rel="nofollow noreferrer">Julian Day time format</a></p>
<p>Is there a function in R to do this? Any suggest... | <p>Maybe you want something like this (thanks to @Dave2e):</p>
<pre class="lang-r prettyprint-override"><code>your_julian <- c(0.388025231484789, 0.388718518515816, 0.389415509256651, 0.390111689812329, 0.390806828705536, 0.392295023149927)
your_date <- as.POSIXct(your_julian*24*3600, origin="2022-07-08"... | Julian Day time to military time - R | r|time|datetime-format|julian-date | -1 | 43 | 1 | 72,911,292 | 72,911,292 | 0 | true | 2022-07-08T11:09:37.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Julian Day time to military time - R<p>I want to convert the following JD time format to its intuitively interpretable military format ("%H:%M:%S")... |
72,882,847 | How to modify array without its modification in previously added deque?<p>I faced the next problem.
The simplified view of my code is:</p>
<pre><code>class Board{
Cell[][] cells = new Cell[9][9]
Deque<Cell[][]> cellsReserved = new ArrayDeque<>();
public static void main(){
cells[5][4] = new Cell(5)... | <p>There is only a single instance of <code>Cell[][] cells</code> here, so no matter how many times it is added to the Deque it is still the same reference to same instance. Moreover <code>cells[5][4].setValue(10);</code> overrides the value inside the selected <code>Cell</code> instance, so you need to create a new <c... | How to modify array without its modification in previously added deque? | java|arrays|reference|deque | 0 | 43 | 1 | 72,883,606 | 72,883,606 | 0 | true | 2022-07-06T11:30:40.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to modify array without its modification in previously added deque?<p>I faced the next problem.
The simplified view of my code is:</p>
<pre><code>class B... |
72,942,249 | How to handle List of multidimensional array as @RequestParam in Spring boot<p>I need to get value in request body for list of multidimensional array</p>
<p>@RequestBody CreateRequest createRequest</p>
<hr />
<pre><code>@Getter
@Setter
public class CreateRequest {
private String id;
private List<PolygonRequ... | <p>Try using the below Array declaration for accessing the String boundary.</p>
<pre><code>private String[][][] boundary;
</code></pre>
<p>Also, check for the data type you need(String or Double).</p> | How to handle List of multidimensional array as @RequestParam in Spring boot | java|spring-boot|rest|spring-mvc|multidimensional-array | 0 | 43 | 1 | 72,942,871 | 72,942,871 | 0 | true | 2022-07-11T17:11:46.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to handle List of multidimensional array as @RequestParam in Spring boot<p>I need to get value in request body for list of multidimensional array</p>
<p>... |
73,028,935 | How to merge two Api array results in to one in angular<p>My first api array results are like below:</p>
<pre><code>{name: 'ABC', state: 'AR', licenseNumber: '100108512'}
{name: 'DEF', state: 'KY', licenseNumber: '100108518'}
</code></pre>
<p>My second api array results are like below:</p>
<pre><code>{rollnum: '20' nam... | <p>Just map and concat:</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>// example
let first = [{ name: 'ABC', state: 'AR', licenseNumber: '100108512' }, { name: 'DEF', state: ... | How to merge two Api array results in to one in angular | javascript|arrays|angular|angular10 | 0 | 43 | 1 | 73,028,992 | 73,028,992 | 0 | true | 2022-07-18T21:43:19.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to merge two Api array results in to one in angular<p>My first api array results are like below:</p>
<pre><code>{name: 'ABC', state: 'AR', licenseNumber:... |
72,905,520 | IIS caching "The layout page could not be found at the following path" error<h2>The Problem</h2>
<p>I have a website running in IIS. If I rename or delete one of the layout page <code>.cshtml</code> files under <code>/Views/</code> the site immediately begins throwing following yellow screen error as expected</p>
<pre>... | <p>It appears to be part of the behavior of <code>FcnMode="Single"</code>. See <a href="https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.fcnmode?view=netframework-4.8" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.fcnmode?view=netframework-4... | IIS caching "The layout page could not be found at the following path" error | asp.net-mvc|iis|caching|runtime-error | 1 | 43 | 1 | 73,028,835 | 73,028,835 | 0 | true | 2022-07-08T00:30:31.883Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
IIS caching "The layout page could not be found at the following path" error<h2>The Problem</h2>
<p>I have a website running in IIS. If I rename or delete on... |
72,938,282 | Error H14 heroku with selenium and fastapi using python<p>I have a Fastapi with python that does some kind of web scraping. The api does the scraping part correctly and I'm sure of that by testing, but it shows this error when I visit the api page:</p>
<pre><code>2022-07-08T09:15:12.564152+00:00 app[worker.1]: INFO: St... | <p>You've partly answered the question yourself: the reason you are getting the heroku error is that you are not defining a <code>web</code> process, which you <a href="https://devcenter.heroku.com/articles/procfile#the-web-process-type" rel="nofollow noreferrer">need to use to expose a web API</a>. You've also given t... | Error H14 heroku with selenium and fastapi using python | python|web-scraping|heroku | 0 | 43 | 1 | 72,972,796 | 72,972,796 | 0 | true | 2022-07-11T12:02:43.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error H14 heroku with selenium and fastapi using python<p>I have a Fastapi with python that does some kind of web scraping. The api does the scraping part co... |
72,916,183 | I am new to flutter and I think I have misunderstood the widget and layout system<p>If I want to add more buttons and text widgets where and how should I do it, should I make some sort of column and row system or am I totally off? And is my code programmed wrong?</p>
<pre><code>import 'package:flutter/material.dart';
... | <p>For better understanding I would recommend you checking out this medium article. <a href="https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e" rel="nofollow noreferrer">https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e</a> Here you can view all the important layout... | I am new to flutter and I think I have misunderstood the widget and layout system | flutter|dart|layout | 0 | 43 | 2 | 72,916,261 | 72,916,261 | 0 | true | 2022-07-08T19:30:50.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I am new to flutter and I think I have misunderstood the widget and layout system<p>If I want to add more buttons and text widgets where and how should I do ... |
72,991,254 | how i set only one table row dropdown in reactjs<p>I am using reacts to develop a website. I need to put a dropdown in only one column.</p>
<pre><code> const tableConfigs = [
{
name: "return or not",
column: {
args: { dataIndex: ["product", "uuid"] },
},
... | <p>You can use this code for creating a select options. I hope it's use full for you.</p>
<pre><code> import { Select } from 'antd';
const { Option } = Select;
const handleChange = (value) => {
console.log(value); // { value: "no", key: "no", label: "NO" }
... | how i set only one table row dropdown in reactjs | reactjs|dropdown | 0 | 43 | 1 | 72,992,923 | 72,992,923 | 0 | true | 2022-07-15T08:34:31.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how i set only one table row dropdown in reactjs<p>I am using reacts to develop a website. I need to put a dropdown in only one column.</p>
<pre><code> const... |
72,769,939 | Getting content of multiple tags with beautifulsoup in python<p>I have an HTML temp like below</p>
<pre class="lang-html prettyprint-override"><code><tr>
<td width="45">
<p style="text-align: center;"><strong>STT</strong></p>
</td>
<td width=&qu... | <p>This should work.</p>
<pre><code>soup = BeautifulSoup(res, 'html.parser')
data = soup.find_all('tr')
accepted_li = ('address', 'phonenumber', 'email') # tuple of "li" informations you want to get
for tr in data:
hospital_span = tr.find('span', {'id': 'list hospital'}) # get span of the hospital name
... | Getting content of multiple tags with beautifulsoup in python | python|beautifulsoup | 2 | 43 | 1 | 72,770,380 | 72,770,380 | 1 | true | 2022-06-27T09:36:59.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting content of multiple tags with beautifulsoup in python<p>I have an HTML temp like below</p>
<pre class="lang-html prettyprint-override"><code><tr&g... |
72,769,121 | Replace all spaces between certain characters with regex<p>I want to replace all spaces with certain words with the help of regex</p>
<p>from</p>
<pre><code><h3>Chinese Fan Palms</h3>
</code></pre>
<p>to</p>
<pre><code><h3>ChinesehoneyFanhoneyPalms</h3>
</code></pre>
<p>My Replace word is <stron... | <p>I hope this is what you are looking for,</p>
<p>Find:<code>(^<h3>|\G).*?\K </code> note! After <code>\K</code> there is a single space ...<br />
Replace with:<code>Honey</code></p>
<p>This regex only effects if the line starts with <code><h3></code> ....</p> | Replace all spaces between certain characters with regex | regex|notepad++ | -3 | 43 | 1 | 72,774,871 | 72,774,871 | 1 | true | 2022-06-27T08:30:23.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace all spaces between certain characters with regex<p>I want to replace all spaces with certain words with the help of regex</p>
<p>from</p>
<pre><code>... |
72,776,313 | change the type of column in postgres not working<p>I have a column of type object, and i need to make it from another object type, (the table is empty )</p>
<p>i tried to do :</p>
<pre><code>ALTER TABLE invoice_history ALTER COLUMN invoice_info TYPE invoice USING (trim(invoice_info)::invoice);
</code></pre>
<blockquot... | <p>If the table is empty (or you do not care about the column value conversion) use just <code>null</code>, e.g.:</p>
<pre class="lang-sql prettyprint-override"><code>alter table invoice_history
alter invoice_info type invoice using null;
</code></pre> | change the type of column in postgres not working | sql|postgresql | 1 | 43 | 1 | 72,777,527 | 72,777,527 | 1 | true | 2022-06-27T17:43:17.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
change the type of column in postgres not working<p>I have a column of type object, and i need to make it from another object type, (the table is empty )</p>... |
72,782,266 | Symfony 6 php 8 Entity Form<p>I'm trying to create a form with Symfony 6 (without database behind).</p>
<p>I create an Entity like this :</p>
<pre><code><?php
namespace App\Entity;
class MyObject
{
private string $name;
public function getName(): ?string
{
return $this->$name;
}
pu... | <p>You have an error, it's not:</p>
<pre><code>$this->$name
</code></pre>
<p>but:</p>
<pre><code>$this->name
</code></pre> | Symfony 6 php 8 Entity Form | php|class|symfony | 0 | 43 | 1 | 72,782,495 | 72,782,495 | 1 | true | 2022-06-28T07:23:57.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Symfony 6 php 8 Entity Form<p>I'm trying to create a form with Symfony 6 (without database behind).</p>
<p>I create an Entity like this :</p>
<pre><code><... |
72,775,311 | language in microservice RESt API design<p>So im in the middle of breaking up a monolith, and i have decomposed it into services. However i came across something interesting.</p>
<p>We have a scenario where a customer is referred to as "customer", "client", "prospect"</p>
<p>And they all m... | <p>It is likely that this is a case of different bounded contexts, where the same thing might be referred to using different terms, or the other way around, where the same word might have different meanings. It is important to understand and map these contexts, so that ambiguities can be minimized and interrelationship... | language in microservice RESt API design | rest|domain-driven-design | 1 | 43 | 3 | 72,782,585 | 72,782,585 | 1 | true | 2022-06-27T16:18:44.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
language in microservice RESt API design<p>So im in the middle of breaking up a monolith, and i have decomposed it into services. However i came across somet... |
72,784,526 | Python reading met.no weather API gives "string indices must be integers" when trying to convert to JSON<p>I am reading met.no weather API from the URL <a href="https://api.met.no/weatherapi/locationforecast/2.0/complete?lat=59.911491&lon=10.757933" rel="nofollow noreferrer">https://api.met.no/weatherapi/locationfo... | <p>There is a little typo mistake. You should use <code>json.loads</code> instead of <code>json.load</code>.</p>
<pre class="lang-py prettyprint-override"><code>import json
from urllib.request import Request, urlopen
# Read forecast
url = "https://api.met.no/weatherapi/locationforecast/2.0/complete?lat=59.911491&... | Python reading met.no weather API gives "string indices must be integers" when trying to convert to JSON | python | 0 | 43 | 2 | 72,784,656 | 72,784,656 | 1 | true | 2022-06-28T10:07:34.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python reading met.no weather API gives "string indices must be integers" when trying to convert to JSON<p>I am reading met.no weather API from the URL <a hr... |
72,785,968 | return table in postgresql two case<p>I am migrating stored procedure from SQL SERVER to POSTGRESQL. I should return table. But, I have following problem:</p>
<pre><code>IF ROWSTATE = 'L' THEN
return TABLE A;
ELSIF ROWSTATE = 'C' THEN
return TABLE B;
END IF
</code></pre>
<p>How to do it, using function in P... | <p>You have to create a function that <code>RETURNS TABLE</code> with the columns expected from tables <code>a</code> and <code>b</code>, e.g:</p>
<pre><code>CREATE OR REPLACE FUNCTION myfunc(rowstate text)
RETURNS TABLE (ret_col1 text, ret_col2 text) AS $$
BEGIN
IF $1='L' THEN
RETURN QUERY SELECT cola1, cola2 F... | return table in postgresql two case | postgresql|plpgsql | 1 | 43 | 1 | 72,786,236 | 72,786,236 | 1 | true | 2022-06-28T11:56:00.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
return table in postgresql two case<p>I am migrating stored procedure from SQL SERVER to POSTGRESQL. I should return table. But, I have following problem:</p... |
72,788,138 | Machine Learning - Train a model using imbalanced data<p>I have two classes in my data.</p>
<p>This is how class distribution looks like.</p>
<pre><code>0.0 169072
1.0 84944
</code></pre>
<p>In other words, I have 2:1 class distribution.</p>
<p>I believe I have two choices. Downsample the class <code>0.0</code> ... | <p>I would not recommend either approach.</p>
<p>I'm thinking about models to detect fraud. By definition, fraud should be a small percentage of outcomes - on the order of 1-5%. Changing the percentage for training would be a gross distortion of the problem being solved.</p>
<p>Better to leave the proportions as they... | Machine Learning - Train a model using imbalanced data | scikit-learn|logistic-regression|xgboost|lightgbm | 0 | 43 | 2 | 72,788,339 | 72,788,339 | 1 | true | 2022-06-28T14:18:30.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Machine Learning - Train a model using imbalanced data<p>I have two classes in my data.</p>
<p>This is how class distribution looks like.</p>
<pre><code>0.0 ... |
72,788,811 | ValueError of Input and Output values during LSTM training<p>I was trying to implement a basic LSTM network using some random data, and I got the following error during execution of the code</p>
<p>'''</p>
<pre><code>Traceback (most recent call last):
File "C:/Users/dell/Desktop/test run for LSTM thingy.py"... | <p>You are currently trying to do categorical classification with 5 classes but <code>y</code> has the shape <code>(28, 133, 1320)</code>. It does not work like that. Also, when you use <code>categorical_crossentropy</code>, you need one-hot-encoded labels. Here is a working example as orientation:</p>
<pre><code>impor... | ValueError of Input and Output values during LSTM training | python|tensorflow|keras|lstm|recurrent-neural-network | 0 | 43 | 1 | 72,789,161 | 72,789,161 | 1 | true | 2022-06-28T14:59:31.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ValueError of Input and Output values during LSTM training<p>I was trying to implement a basic LSTM network using some random data, and I got the following e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.