This is a valid Atom 1.0 feed.
This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://back ...
line 415, column 37: (3 occurrences) [help]
<updated>2025-11-05T14:01:55Z</updated>
^
<entry>
<entry>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:re="http://purl.org/atompub/rank/1.0"> <title type="text">Recent Questions - Stack Overflow</title> <link rel="self" href="https://stackoverflow.com/feeds" type="application/atom+xml" /> <link rel="alternate" href="https://stackoverflow.com/questions" type="text/html" /> <subtitle>most recent 30 from stackoverflow.com</subtitle> <updated>2025-11-05T14:12:38Z</updated> <id>https://stackoverflow.com/feeds</id> <creativeCommons:license>https://creativecommons.org/licenses/by-sa/4.0/rdf</creativeCommons:license> <entry> <id>https://stackoverflow.com/q/79810172</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Autodesk: Deprecated Download object API not working</title> <category scheme="https://stackoverflow.com/tags" term="autodesk-forge" /> <author> <name>Sushrut Paranjape</name> <uri>https://stackoverflow.com/users/4746457</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810172/autodesk-deprecated-download-object-api-not-working" /> <published>2025-11-05T14:08:43Z</published> <updated>2025-11-05T14:08:43Z</updated> <summary type="html"> <p>We have been using Autodesk APIs to download files in ACC. We have two Autodesk apps used in two different environments.</p>
<p>One of the application is quite older created in 2017, using which we are able to download the files using endpoint e.g. <a href="https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-GET/" rel="nofollow noreferrer">https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-GET/</a></p>
<p>We see this endpoint is marked Deprecated but it is working fine and downloading files without any issues for this app.</p>
<p>Whereas the other application registered in 2025, when tries to download the file using the deprecated endpoint gives error: {&quot;reason&quot;:&quot;Legacy endpoint is deprecated&quot;} and download doesn’t work. We tried different type of files but facing same issue.</p>
<p>While we are working on implementing new endpoint mentioned in the article, we would like to know below questions:</p>
<ol>
<li>Why the endpoint works for one and doesn't work for another application?</li>
<li>If we there is a way that newer app can make successful API calls for the deprecated endpoint while we update the code?</li>
<li>Is there any timeline that our older app which is working fine currently would also stop working?</li>
</ol>
<p>Please let us know if you need any additional details.</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810168</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Is there a libcocos2djs.so binary for x86_64 android architecture</title> <category scheme="https://stackoverflow.com/tags" term="android" /> <category scheme="https://stackoverflow.com/tags" term="mobile-development" /> <category scheme="https://stackoverflow.com/tags" term="cocos2d-js" /> <author> <name>Nappy</name> <uri>https://stackoverflow.com/users/4032416</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810168/is-there-a-libcocos2djs-so-binary-for-x86-64-android-architecture" /> <published>2025-11-05T14:05:20Z</published> <updated>2025-11-05T14:05:20Z</updated> <summary type="html"> <p>I am trying to patch and rebuild an apk to support libcocos2djs.so library x86_64 arch for Android images. So far this app supports armabi-v7a and arm74-v8a architectures only.
My findings so far suggest I should recompile the binaries with NDK for the x86_64 architecture then, create the appropriate sub-dir in the lib/ folder of the decompiled , before resigning and comfortably installing on a device/emulator.</p>
<p>Is there any clear set of instructions i can follow to achieve this? Also, can you please point me to the right binary code for cocos2djs from which I can recompile with cmake? Or does someone already have the compiled libcocos2djs.so library for x86_64 arch build?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810165</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">How to get the url of the first entrypoint with Gravitee Expression Language?</title> <category scheme="https://stackoverflow.com/tags" term="gravitee" /> <author> <name>fabien-michel</name> <uri>https://stackoverflow.com/users/1216183</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810165/how-to-get-the-url-of-the-first-entrypoint-with-gravitee-expression-language" /> <published>2025-11-05T14:03:37Z</published> <updated>2025-11-05T14:03:37Z</updated> <summary type="html"> <p>I'm using the `URL Rewriting` policy and I want to rewrite the URL using the entrypoint URL (as defined in UI) but I can't find which EL variables is exposing it.</p>
<p>Any idea ?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810164</id> <re:rank scheme="https://stackoverflow.com">-3</re:rank> <title type="text">Python script to rename duplicate files</title> <category scheme="https://stackoverflow.com/tags" term="python" /> <author> <name>sri vaishnavi rajagopalan</name> <uri>https://stackoverflow.com/users/31820938</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810164/python-script-to-rename-duplicate-files" /> <published>2025-11-05T14:03:34Z</published> <updated>2025-11-05T14:03:57Z</updated> <summary type="html"> <p>the filename should be checked across a directory having many folders. after the renaming, the directory should be again checked for duplicates. this process should repeat until there is no filename duplicates found in the directory. Also provide a detailed log step by step -of the duplicate filenames found and renamed filenames. The exact filename regex would be - V1_A_B_C_D_E_F_G__.* -where A would be date format in YYYYMMDD and B would be digits of length 3 and C would be digits of length 2 and D would be digits of length 4 ,5 or 6 , E would be digits of length 4, F would be digits of length 3 and this part G would be 2 digit number and the rest .* would be combination of alphabets, underscore and digits. I want you to change only the 2 digit number G, by incrementing the number by 1.</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810163</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Override __memcmpeq with --wrap</title> <category scheme="https://stackoverflow.com/tags" term="rust" /> <category scheme="https://stackoverflow.com/tags" term="riscv" /> <author> <name>gonzo</name> <uri>https://stackoverflow.com/users/1837180</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810163/override-memcmpeq-with-wrap" /> <published>2025-11-05T14:03:33Z</published> <updated>2025-11-05T14:03:33Z</updated> <summary type="html"> <p>I'm unable to override the compiler-generated <code>__memcmpeq</code> function using <code>--wrap=__memcmpeq</code>, which is a shortcut for boolean usage of memcmp (but is otherwise the same).</p>
<pre><code>rustflags = [&quot;-C&quot;, &quot;link-args=-Wl,--wrap=__memcmpeq&quot;]
</code></pre>
<p>--&gt;</p>
<pre class="lang-bash prettyprint-override"><code>$ riscv64-linux-gnu-objdump -drl target/riscv64gc-unknown-linux-gnu/release/rusty | grep memcmp
 129ec: 8b2080e7 jalr -1870(ra) # f929a &lt;__memcmpeq&gt;
</code></pre>
<p>It's not getting wrapped. Other functions are getting wrapped properly, eg. <code>memcmp</code>. Any ideas? I really don't want to add an ELF post-processing step just to rewrite the first instruction in <code>__memcmpeq</code> to jump to my function.</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810160</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">How to make a player stick to a planet while moving?</title> <category scheme="https://stackoverflow.com/tags" term="unity-game-engine" /> <category scheme="https://stackoverflow.com/tags" term="game-development" /> <category scheme="https://stackoverflow.com/tags" term="game-physics" /> <category scheme="https://stackoverflow.com/tags" term="physics" /> <author> <name>Matheo Besson</name> <uri>https://stackoverflow.com/users/31807300</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810160/how-to-make-a-player-stick-to-a-planet-while-moving" /> <published>2025-11-05T14:00:05Z</published> <updated>2025-11-05T14:00:05Z</updated> <summary type="html"> <p>I actually make a game about a space explorer but i've enconter a problem. When my player hit the ground (or when he spawn on the surface) he slide on the back of the planet. How can i actually make the player stick to the ground and follow the rotation whithoput causing any problem on the other planets gravitational attraction and space mouvements.</p>
<p>here the code for the attraction</p>
<pre class="lang-cs prettyprint-override"><code>using NUnit.Framework;
using UnityEngine;

public class PlayerGravity : MonoBehaviour
{
 NbodySimulation Simulation;
 Rigidbody rb;
 constant constantValues;
 public CelestialBody reference;
 FirstPersonController firstPersonController;

 public Vector3 initialVelocity;

 private void Start()
 {
 
 Simulation = GameObject.Find(&quot;Universe&quot;).GetComponent&lt;NbodySimulation&gt;();
 rb = GetComponent&lt;Rigidbody&gt;();
 rb.AddForce(initialVelocity, ForceMode.VelocityChange);
 constantValues = GameObject.Find(&quot;Universe&quot;).GetComponent&lt;constant&gt;();
 firstPersonController = GetComponent&lt;FirstPersonController&gt;();
 }

 private void FixedUpdate()
 {
 CelestialBody[] bodies = Simulation.bodies;
 Vector3 strongestGravitionalPull = Vector3.zero;

 //if we are landed
 if (firstPersonController.referenceGround)
 {
 var planetRb = firstPersonController.referenceGround.GetComponent&lt;Rigidbody&gt;();
 var toCenter = (planetRb.position - rb.position).normalized;

 // vitesse relative entre joueur et planète
 var relativeVel = rb.linearVelocity - planetRb.linearVelocity;

 // composante radiale (vers la planète)
 var radialVel = Vector3.Dot(relativeVel, toCenter);

 // si on se rapproche trop vite de la surface
 if (radialVel &lt; 0)
 rb.linearVelocity -= toCenter * radialVel; // annule juste la composante vers le centre

 // léger amortissement sur les petites oscillations
 rb.linearVelocity = Vector3.Lerp(rb.linearVelocity, planetRb.linearVelocity, 0.05f);
 }

 //Gravity
 foreach (CelestialBody body in bodies)
 {
 float sqrtDst = (body.transform.position - rb.position).sqrMagnitude;
 Vector3 forceDir = (body.transform.position - rb.position).normalized;
 Vector3 acceleration = forceDir * constantValues.GravityConstant * body.mass / sqrtDst;
 rb.AddForce(acceleration, ForceMode.Acceleration);

 //Find Body with strongest gravitanional pull
 if (acceleration.sqrMagnitude &gt; strongestGravitionalPull.sqrMagnitude)
 {
 strongestGravitionalPull = acceleration;
 reference = body;
 
 }

 }

 //Rotate for align with gravity up
 Vector3 gravityUp = -strongestGravitionalPull.normalized;
 rb.rotation = Quaternion.FromToRotation(transform.up, gravityUp) * rb.rotation;

 }
}
</code></pre>
<p>btw sry for my english i'm french</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810154</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">How to get values from multiple dynamically generated components in an editform</title> <category scheme="https://stackoverflow.com/tags" term="asp.net-core" /> <category scheme="https://stackoverflow.com/tags" term="blazor-server-side" /> <author> <name>Wilock</name> <uri>https://stackoverflow.com/users/1050427</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810154/how-to-get-values-from-multiple-dynamically-generated-components-in-an-editform" /> <published>2025-11-05T13:54:09Z</published> <updated>2025-11-05T13:59:27Z</updated> <summary type="html"> <p>Hopefully someone can advise me how to get out of this corner I've coded myself into! I'm pretty new to Blazor and have never created a dynamically generated form before. I THOUGHT I was on the right track, but maybe not. I need to add as many of the child component (DynamicStep.razor) to an editform as the user requires. I can add them to the parent page without issue. I can also get the values from the controls...the problem is I just don't have clue which control each of the values came from.</p>
<p>If I'm on the wrong path, can someone point me in the right direction? Any help would be enormously appreciated!</p>
<p><strong>DynamicStep.razor (Child Component):</strong></p>
<pre><code>&lt;div class=&quot;col-lg-3&quot;&gt;
 &lt;label for=&quot;@Id&quot; class=&quot;fw-bold&quot;&gt;@Id&lt;/label&gt;
 &lt;div class=&quot;input-group&quot;&gt;
 &lt;select id=&quot;@Id&quot; @bind:get=&quot;StepValue&quot; @bind:set=&quot;SetValue!&quot;&gt;
 &lt;option selected value=&quot;0&quot;&gt;N/A&lt;/option&gt;
 &lt;option value=&quot;1&quot;&gt;Pass&lt;/option&gt;
 &lt;option value=&quot;2&quot;&gt;Fail&lt;/option&gt;
 &lt;option value=&quot;3&quot;&gt;In Progress&lt;/option&gt;
 &lt;/select&gt;
 &lt;/div&gt;
&lt;/div&gt;

@code {
 [Parameter] public string? Id { get; set; }
 [Parameter] public EventCallback&lt;string&gt; HandleNewStepEvent { get; set; }
 [Parameter] public string? StepValue { get; set; }
 private async Task SetValue(string newValue)
 {
 if (StepValue != newValue)
 {
 StepValue = newValue;
 await HandleNewStepEvent.InvokeAsync(newValue);
 }
 }
}
</code></pre>
<p><strong>Parent:</strong></p>
<pre><code>&lt;div class=&quot;row&quot;&gt;
 &lt;div class=&quot;col-lg-12&quot;&gt;
 &lt;EditForm Model=&quot;@addJobStep&quot; OnValidSubmit=&quot;AddJobStepControl&quot; FormName=&quot;frmAddJobStep&quot;&gt;
 &lt;DataAnnotationsValidator /&gt;
 &lt;div class=&quot;container-fluid border border-1 rounded p-3&quot; style=&quot;background-color:lightgray;&quot;&gt;
 &lt;div class=&quot;row&quot;&gt;
 &lt;div class=&quot;col-lg-3&quot;&gt;
 &lt;label for=&quot;stepOrder&quot;&gt;Step Order&lt;/label&gt;
 &lt;InputSelect id=&quot;stepName&quot; @bind-Value=&quot;addJobStep.StepName&quot; class=&quot;form-control form-control-sm&quot;&gt;
 &lt;option selected disabled value=&quot;&quot;&gt;Select a Step&lt;/option&gt;
 @if (stepTitles != null)
 {
 @foreach (var val in stepTitles!)
 {
 &lt;option value=&quot;@val.Title&quot;&gt;@val.Title&lt;/option&gt;
 }
 }
 &lt;/InputSelect&gt;
 &lt;ValidationMessage For=&quot;@(() =&gt; addJobStep.StepName)&quot; /&gt;
 &lt;/div&gt;
 &lt;div class=&quot;col-lg-3&quot;&gt;
 &lt;label for=&quot;stepOrder&quot;&gt;Step Order&lt;/label&gt;
 &lt;InputNumber id=&quot;stepOrder&quot; @bind-Value=&quot;addJobStep.StepOrder&quot; class=&quot;form-control form-control-sm&quot; /&gt;
 &lt;ValidationMessage For=&quot;@(() =&gt; addJobStep.StepOrder)&quot; /&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class=&quot;row pt-2&quot;&gt;
 &lt;div class=&quot;input-group&quot;&gt;
 &lt;div class=&quot;pe-1&quot;&gt;
 &lt;button type=&quot;submit&quot; class=&quot;btn btn-sm btn-primary&quot;&gt;
 &lt;span class=&quot;bi bi-plus-circle&quot; aria-hidden=&quot;false&quot;&gt;&lt;/span&gt; Add
 &lt;/button&gt;
 &lt;/div&gt;
 &lt;div class=&quot;pe-1&quot;&gt;
 &lt;button type=&quot;button&quot; class=&quot;btn btn-sm btn-warning&quot; @onclick=&quot;ClearJobStep&quot;&gt;
 &lt;span class=&quot;bi bi-x-lg&quot; aria-hidden=&quot;false&quot;&gt;&lt;/span&gt; Clear
 &lt;/button&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;/EditForm&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
 &lt;div class=&quot;col-lg-12 mt-2&quot;&gt;
 @* I have a quickgrid here that displays all the generated controls where I can edit or delete them. *@
 &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
 &lt;div class=&quot;col-lg-12&quot;&gt;
 &lt;EditForm Model=&quot;@addDeliverable&quot; OnValidSubmit=&quot;AddDeliverable&quot;&gt;
 &lt;DataAnnotationsValidator /&gt;
 &lt;div class=&quot;container-fluid border border-1 rounded p-3&quot; style=&quot;background-color:lightgray;&quot;&gt;
 &lt;div class=&quot;row&quot;&gt;
 &lt;div class=&quot;col-lg-4&quot;&gt;
 &lt;label for=&quot;prod&quot;&gt;Prod/RMA&lt;/label&gt;
 &lt;InputText id=&quot;prod&quot; @bind-Value=&quot;addDeliverable.ProdRMA&quot; class=&quot;form-control form-control-sm&quot; /&gt;
 &lt;ValidationMessage For=&quot;@(() =&gt; addDeliverable.ProdRMA)&quot; /&gt;
 &lt;/div&gt;
 &lt;div class=&quot;col-lg-4&quot;&gt;
 &lt;label for=&quot;serialnumber&quot;&gt;Serial#&lt;/label&gt;
 &lt;InputText id=&quot;serialnumber&quot; @bind-Value=&quot;addDeliverable.SerialNumber&quot; class=&quot;form-control form-control-sm&quot; /&gt;
 &lt;ValidationMessage For=&quot;@(() =&gt; addDeliverable.SerialNumber)&quot; /&gt;
 &lt;/div&gt;
 &lt;div class=&quot;row&quot;&gt;
 @if (PartialDeliverableStepsVals != null)
 {
 &lt;div class=&quot;row&quot;&gt;
 @foreach (var step in PartialDeliverableStepsVals)
 {
 @foreach (var step in jobStepList)
 {
 &lt;DynamicStep @key=&quot;@step.JobStepId&quot; Id=&quot;@step.StepName&quot; HandleNewStepEvent=&quot;HandleNewStepEvent&quot;&gt;&lt;/DynamicStep&gt;
 }
 }
 &lt;/div&gt;
 }
 &lt;/div&gt; 
 &lt;div class=&quot;col-lg-3&quot;&gt;
 &lt;div class=&quot;input-group mt-4&quot;&gt;
 &lt;div class=&quot;pe-1&quot;&gt;
 &lt;button type=&quot;submit&quot; class=&quot;btn btn-sm btn-primary&quot;&gt;
 &lt;span class=&quot;bi bi-plus-circle&quot; aria-hidden=&quot;false&quot;&gt;&lt;/span&gt; Add
 &lt;/button&gt;
 &lt;/div&gt;
 &lt;div class=&quot;pe-1&quot;&gt;
 &lt;button type=&quot;button&quot; class=&quot;btn btn-sm btn-warning&quot; @onclick=&quot;ClearDeliverable&quot;&gt;
 &lt;span class=&quot;bi bi-x-lg&quot; aria-hidden=&quot;false&quot;&gt;&lt;/span&gt; Clear
 &lt;/button&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt; 
 &lt;/div&gt;
 &lt;/EditForm&gt;
 &lt;/div&gt;
&lt;/div&gt;


@code{
 private List&lt;StepTitle&gt;? stepTitles;
 private string stepId;
 
 protected override async Task OnInitializedAsync()
 {
 await base.OnInitializedAsync();

 dbContext = DbContextFactory.CreateDbContext();
 await LoadStepOptions();
 await LoadJobStepControls();
 }
 
 private async Task LoadStepOptions()
 {
 //This holds values like &quot;Mechanical&quot;, &quot;Final Prep&quot;, &quot;Final Inspection&quot;, etc...
 stepTitles = await dbContext.StepTitles.ToListAsync();
 }

 private void HandleNewStepEvent(string extraStep)
 {
 //not sure what to do here since I can't tell which child control the value is coming from
 }

 private async Task AddJobStepControl()
 {
 hideStepMessage = true;

 if (jobStepList != null &amp;&amp; jobStepList.Count &gt; 0)
 {
 bool alreadyExists = jobStepList.Any(x =&gt; x.StepName == addJobStep.StepName!.ToString());
 if (alreadyExists)
 {
 hideStepMessage = false;
 return;
 }
 }

 using var context = DbContextFactory.CreateDbContext();
 addJobStep.JobId = JobId;
 await context.JobSteps.AddAsync(addJobStep);
 await context.SaveChangesAsync();

 await LoadJobStepControls();
 addJobStep = new();
 }

 private async Task LoadJobStepControls()
 {
 jobStepList = await dbContext.JobSteps.Where(x =&gt; x.JobId == JobId).ToListAsync();
 }
}
</code></pre>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810139</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">How to know from where the fbx was imported once it's already an uasset?</title> <category scheme="https://stackoverflow.com/tags" term="unreal-engine5" /> <author> <name>softyoda yoann</name> <uri>https://stackoverflow.com/users/4174454</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810139/how-to-know-from-where-the-fbx-was-imported-once-its-already-an-uasset" /> <published>2025-11-05T13:46:19Z</published> <updated>2025-11-05T14:07:12Z</updated> <summary type="html"> <p>Once the ue5 uasset static mesh is imported, is there a way to know it's original path to reimport it (but rewrite over it in the same directory to not create a mess each time) ?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810042</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">How to manually load a native visualiser during debugging in Visual Studio 2022?</title> <category scheme="https://stackoverflow.com/tags" term="c++" /> <category scheme="https://stackoverflow.com/tags" term="debugging" /> <category scheme="https://stackoverflow.com/tags" term="visual-studio-2022" /> <category scheme="https://stackoverflow.com/tags" term="watch" /> <category scheme="https://stackoverflow.com/tags" term="natvis" /> <author> <name>Dominique</name> <uri>https://stackoverflow.com/users/4279155</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810042/how-to-manually-load-a-native-visualiser-during-debugging-in-visual-studio-2022" /> <published>2025-11-05T12:24:40Z</published> <updated>2025-11-05T14:01:11Z</updated> <summary type="html"> <p>I'm working with COM objects, which means I need to debug <code>SAFEARRAY</code> objects.</p>
<p>It looks as follows in the watch-window:</p>
<pre><code>receivedData 0x007cc980 safearray of UI1, [rank]=1 _variant_t
 safearray 0x007cc980 safearray of UI1, [rank]=1 tagSAFEARRAY*
 [0] 55 '7' unsigned char
 [1] 48 '0' unsigned char
...
</code></pre>
<p>I would like it to look as follows:</p>
<pre><code>receivedData 0x007cc980 safearray of UI1, [rank]=1 _variant_t
 safearray 0x007cc980 safearray. ILbound=0, cElements=19, array=[55 '7', 48 '0', ...] tagSAFEARRAY*
</code></pre>
<p>In order to achieve this, I have created a SAFEARRAY.natvis file, which looks as follows:</p>
<pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;AutoVisualizer xmlns=&quot;http://schemas.microsoft.com/vstudio/debugger/natvis/2010&quot;&gt;
 &lt;Type Name=&quot;tagSAFEARRAY&quot;&gt;
 &lt;DisplayString&gt;
 0x{address} safearray. ILbound={ILbound[0]}, cElements={cElements}, array=[{Items}]
 &lt;/DisplayString&gt;
 &lt;Expand&gt; &lt;!-- Customize how each element is displayed --&gt;
 &lt;Item Name=&quot;Items&quot;&gt;
 &lt;ArrayItems&gt; &lt;!-- Assuming the array is of type UI1 (unsigned 8-bit integer) --&gt;
 &lt;ItemExpression&gt;data[0]&lt;/ItemExpression&gt;
 &lt;/ArrayItems&gt;
 &lt;/Item&gt;
 &lt;/Expand&gt;
 &lt;Expand&gt;
 &lt;Item Name=&quot;ILbound&quot;&gt;
 &lt;ArrayItems&gt;
 &lt;ItemExpression&gt;rgsabound[0].lLbound&lt;/ItemExpression&gt; &lt;!-- Adjust if necessary --&gt;
 &lt;/ArrayItems&gt;
 &lt;/Item&gt;
 &lt;/Expand&gt;
 &lt;Expand&gt;
 &lt;Item Name=&quot;cElements&quot;&gt;
 &lt;ArrayItems&gt;
 &lt;ItemExpression&gt;cElements&lt;/ItemExpression&gt;
 &lt;/ArrayItems&gt;
 &lt;/Item&gt;
 &lt;/Expand&gt;
 &lt;/Type&gt;
&lt;/AutoVisualizer&gt;
</code></pre>
<p>Now I'd like to test this.</p>
<p>I have put the mentioned file in one of the required directories and I've launched <code>.natvisreload</code>. In my output window, I see the following error message:</p>
<pre><code>Natvis: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\
 Packages\Debugger\Visualizers\SAFEARRAY.natvis(10,21):
 Fatal error:
 Element '{http://schemas.microsoft.com/vstudio/debugger/natvis/2010}ArrayItems'
 is unexpected according to content model of parent element
 '{http://schemas.microsoft.com/vstudio/debugger/natvis/2010}Item'.
</code></pre>
<p>What's wrong here? Why can't I use <code>ArrayItems</code>?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79810001</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Which is a more viable option for a Node.js backend — TypeScript or JavaScript?</title> <category scheme="https://stackoverflow.com/tags" term="javascript" /> <category scheme="https://stackoverflow.com/tags" term="node.js" /> <category scheme="https://stackoverflow.com/tags" term="typescript" /> <author> <name>Akshay payya</name> <uri>https://stackoverflow.com/users/27478418</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79810001/which-is-a-more-viable-option-for-a-node-js-backend-typescript-or-javascript" /> <published>2025-11-05T11:56:59Z</published> <updated>2025-11-05T14:06:06Z</updated> <summary type="html"> <p>I’m setting up a new Node.js backend project and trying to decide whether to go with <strong>TypeScript (TS)</strong> or stick with <strong>JavaScript (JS)</strong>.</p>
<p>I’m aware that TypeScript offers type safety and better tooling, while JavaScript is simpler and requires less setup. However, I’d like to understand the <strong>practical differences</strong> in real-world backend development contexts — especially for scalability, maintainability, and developer productivity.</p>
<p><strong>My questions:</strong></p>
<ol>
<li><p>For medium-to-large backend applications, which one tends to be more maintainable in the long run — TS or JS?</p>
</li>
<li><p>Does TypeScript introduce noticeable overhead (in build time or complexity) for a Node.js backend?</p>
</li>
<li><p>Are there any major ecosystem or library compatibility issues when using TypeScript in Node.js (e.g., with Express, Prisma, or Sequelize)?</p>
</li>
<li><p>From a hiring and collaboration perspective, are most modern Node.js teams moving toward TypeScript?</p>
</li>
</ol>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79809893</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Android driver app location sending to server (Taxi booking app)</title> <category scheme="https://stackoverflow.com/tags" term="php" /> <category scheme="https://stackoverflow.com/tags" term="android" /> <category scheme="https://stackoverflow.com/tags" term="sql-server" /> <author> <name>hamid</name> <uri>https://stackoverflow.com/users/1295141</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79809893/android-driver-app-location-sending-to-server-taxi-booking-app" /> <published>2025-11-05T10:07:29Z</published> <updated>2025-11-05T14:12:16Z</updated> <summary type="html"> <p>I developed a simple Android app (A driver app for taxi booking).</p>
<p>App sends its location (lat/lng) every 5 seconds to server using TCP/IP. and server stores the driver location in SQL SEVER database. if there any message for driver, server returns it. Server is PHP.</p>
<p>This way, when number of drivers reaches about 300, server can not responses some time.</p>
<p>Is there a problem in the mechanism I designed and is it not suitable for this task?</p>
<p>What is the best and Optimal way for driver app to send its position to server and store it? do I have to use UDP Instead of TCP?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79809778</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">What is the ideal production-grade infrastructure to deploy a Python FastAPI service for computing option Greeks (e.g., Black–Scholes)?</title> <category scheme="https://stackoverflow.com/tags" term="python" /> <category scheme="https://stackoverflow.com/tags" term="pandas" /> <category scheme="https://stackoverflow.com/tags" term="performance" /> <category scheme="https://stackoverflow.com/tags" term="fastapi" /> <category scheme="https://stackoverflow.com/tags" term="trading" /> <author> <name>NOOB DEV</name> <uri>https://stackoverflow.com/users/18271352</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79809778/what-is-the-ideal-production-grade-infrastructure-to-deploy-a-python-fastapi-ser" /> <published>2025-11-05T08:07:02Z</published> <updated>2025-11-05T14:01:43Z</updated> <summary type="html"> <p>I am building a python service to compute Greek values using python, but I have never worked on python, and I would appreciate advice from the experienced python devs as it would help me a lot.</p>
<p>FLOW<br />
The service will later integrate with an existing Spring Boot backend.<br />
Currently, I upload an Excel/CSV file (up to <strong>700k rows</strong>) from a UI, which contains option data for which I need to calculate Greeks.</p>
<p>I’m using:</p>
<ul>
<li><p><strong>FastAPI</strong> → async API server (for streaming response)</p>
</li>
<li><p><strong>Pandas</strong> → data manipulation, reading Excel/CSV</p>
</li>
<li><p><strong>NumPy</strong> → vectorized math</p>
</li>
<li><p><strong>SciPy</strong> → Black-Scholes &amp; Greeks computations</p>
</li>
<li><p><strong>orjson</strong> → fast JSON serialization</p>
</li>
<li><p><strong>ProcessPoolExecutor</strong> → for parallel chunk-based processing</p>
</li>
</ul>
<p>File reading (main process) – pandas for CSV (C engine), openpyxl for Excel</p>
<p>Split into chunks – about 20,000 rows per chunk</p>
<p>Parallel computation (ProcessPoolExecutor)</p>
<p>Vectorized Black-Scholes calculations using NumPy</p>
<p>Error checks (NaN, negatives, type mismatches)</p>
<p>Convert results to dict and calculate aggregates</p>
<p>Merge results – combine all chunk outputs and totals</p>
<p>Serialize &amp; stream – use orjson and StreamingResponse</p>
<p>Below is my performance chart, response time for 700k records through excel is 9-11 secs right now</p>
<pre><code>### 700k Rows

| Configuration | Read File | Calculate | Build Results | JSON | Total |
|---------------------|-----------|-----------|---------------|------|--------|
| **Single Process** | 1-2s | 5-6s | 8-10s | 3-4s | 17-22s |
| **4 Workers** | 1-2s | 3-4s* | 3-4s* | 3-4s | 10-14s |
| **8 Workers** | 1-2s | 2-3s* | 2-3s* | 3-4s | 8-12s |

*Parallel processing time (multiple chunks at once)

### 60k Rows

| Configuration | Total Time | Notes |
|---------------------|------------|------------------------------------|
| **Single Process** | 2-3s | No overhead, pure speed |
| **4 Workers** | 3-4s | ⚠️ Overhead &gt; benefit |
| **8 Workers** | 4-5s | ⚠️ Too much overhead 
</code></pre>
<p>Questions (Sorry if it sounds stupid but I want to build production-based applications and learn best practises)</p>
<p>Is it ideal to use workers in this api as they take decent amount of memory and might affect the server, do people use it in production and what things to keep in mind?</p>
<p>Is my tech stack (FastAPI + Pandas + NumPy + SciPy + orjson) appropriate for this type of workload, or should I consider something else (e.g., Polars, Cython, or PyPy)?</p>
<p>Apart from JSON serialization overhead, are there other bottlenecks I should be aware of (e.g., inter-process communication, GIL, or I/O blocking)?.</p>
<p>Any help would be appreciated</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79809035</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Creating an Azure DevOps User Story with Powershell</title> <category scheme="https://stackoverflow.com/tags" term="powershell" /> <category scheme="https://stackoverflow.com/tags" term="azure-devops-rest-api" /> <author> <name>GHarland</name> <uri>https://stackoverflow.com/users/17274920</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79809035/creating-an-azure-devops-user-story-with-powershell" /> <published>2025-11-04T14:32:17Z</published> <updated>2025-11-05T14:03:49Z</updated> <summary type="html"> <p>I'm looping through an Azure DevOps query script to essentially create copies of work items into a new iteration. The problem I'm having is with the final Invoke-RestMethod call at the end of the script. It returns this:</p>
<pre><code>Invoke-RestMethod : {
 &quot;$id&quot;:&quot;1&quot;,
 &quot;innerException&quot;:null,&quot;message&quot;:&quot;Value cannot be null.&quot;,
 &quot;typeName&quot;:&quot;Microsoft.VisualStudio.Services.Common.VssPropertyValidationException,
 Microsoft.VisualStudio.Services.Common&quot;,
 &quot;typeKey&quot;:&quot;VssPropertyValidationException&quot;,
 &quot;errorCode&quot;:0,
 &quot;eventId&quot;:3000
}

</code></pre>
<p>Any ideas where I went wrong?</p>
<pre><code>$organization = &quot;mycompany&quot;
$project = &quot;MyProject&quot;
$pat = &quot;myPAT&quot;
$headers = @{
 Authorization = &quot;Basic &quot; +
 [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(&quot;:$pat&quot;))
}

$newIterationPath = &quot;IT Main\Production Support\2025\2025.4.3&quot; 

# Encode PAT for Authorization header
$base64AuthInfo = [Convert]::ToBase64String(
 [Text.Encoding]::ASCII.GetBytes(&quot;:$pat&quot;)
)

### 1. Run WIQL query to get work item IDs
$wiqlUrl = &quot;https://dev.azure.com/$organization/$project&quot; + 
 &quot;/_apis/wit/wiql/798dee4f-b063-4f4f-a710-415c590a4dcc?&quot; + 
 &quot;api-version=7.0&quot;
$response = Invoke-RestMethod -Uri $wiqlUrl -Method Get -Headers $headers

$workItemIds = $response.workItems.id

### 2. Get details of each work item
foreach ($id in $workItemIds) {
 $workItemUrl = &quot;https://dev.azure.com/$organization/$project&quot; + 
 &quot;/_apis/wit/workitems/$($id)?api-version=7.0&quot;
 $workItem = Invoke-RestMethod -Uri $workItemUrl -Headers $headers

 # Prepare fields for new work item
 $fields = @(
 @{
 &quot;op&quot; = &quot;add&quot;
 &quot;path&quot; = &quot;/fields/System.Title&quot;
 &quot;value&quot; = $workItem.fields.'System.Title'
 },
 @{
 &quot;op&quot; = &quot;add&quot;
 &quot;path&quot; = &quot;/fields/System.Description&quot;
 &quot;value&quot; = $workItem.fields.'System.Description'
 },
 @{
 &quot;op&quot; = &quot;add&quot;
 &quot;path&quot; = &quot;/fields/System.AreaPath&quot;
 &quot;value&quot; = $workItem.fields.'System.AreaPath'
 },
 @{
 &quot;op&quot; = &quot;add&quot;
 &quot;path&quot; = &quot;/fields/System.IterationPath&quot;
 &quot;value&quot; = $newIterationPath
 },
 @{
 &quot;op&quot; = &quot;add&quot;
 &quot;path&quot; = &quot;/fields/System.AssignedTo&quot;
 &quot;value&quot; = $workItem.fields.'System.AssignedTo'
 }
 )

 $body = (ConvertTo-JSON $fields)

 ### 3. Create new work item in target iteration
 $createUrl = &quot;https://dev.azure.com/$organization/$project/_apis/wit/workitems/$&quot; + 
 $workItem.fields.'System.WorkItemType' + &quot;?api-version=7.0&quot;
 $newWorkItem = Invoke-RestMethod `
 -Uri $createUrl `
 -Method POST `
 -Headers $headers `
 -ContentType &quot;application/json-patch+json&quot; `
 -Body $body

 Write-Host &quot;Created new work item: $($newWorkItem.id)&quot;

}

</code></pre>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79802730</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Base class and derived classes in Qt</title> <category scheme="https://stackoverflow.com/tags" term="c++" /> <category scheme="https://stackoverflow.com/tags" term="qt" /> <category scheme="https://stackoverflow.com/tags" term="inheritance" /> <category scheme="https://stackoverflow.com/tags" term="polymorphism" /> <author> <name>NoobNoob</name> <uri>https://stackoverflow.com/users/11051289</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79802730/base-class-and-derived-classes-in-qt" /> <published>2025-10-28T11:26:17Z</published> <updated>2025-11-05T14:10:02Z</updated> <summary type="html"> <p>I'm building a Qt wrapper for <code>RtMidi</code>. As starting point I created two separate classes <code>QMidiOut</code> and <code>QMidiIn</code> that wrap <code>RtMidiOut</code> and <code>RtMidiIn</code>.</p>
<p>I don't want to duplicate code for the common methods (e.g. <code>openPort</code>, <code>closePort</code>, etc), so I'm planning to derive <code>QMidiOut</code> and <code>QMidiIn</code> from a base class (<code>QMidi</code>) with all the the common methods (of <code>RtMidi</code>).</p>
<p>I cannot use template classes (<code>Q_OBJECT</code> doesn't allow that) and I can't create an <code>RtMidi</code> object in the base class, because its destructor is protected.</p>
<p>QMidiIn class:</p>
<pre><code>#ifndef QMIDIIN_H
#define QMIDIIN_H

#include &lt;QObject&gt;
#include &quot;QMidi.h&quot;

class QMidiIn : public QMidi
{
 Q_OBJECT

public:
 explicit QMidiIn(QObject *parent = nullptr);
 ~QMidiIn();

private:
 RtMidiIn* rtMidiIn = nullptr;

 static void callback( double deltatime, std::vector&lt; unsigned char &gt; *message, void *userData );
};

#endif // QMIDIIN_H
</code></pre>
<p>QMidiOut class:</p>
<pre><code>#ifndef QMIDIOUT_H
#define QMIDIOUT_H

#include &lt;QObject&gt;
#include &quot;QMidi.h&quot;

class QMidiOut : public QMidi
{
 Q_OBJECT

public:
 explicit QMidiOut(QObject *parent = nullptr);
 ~QMidiOut();

private:
 RtMidiOut* rtMidiOut = nullptr;
};

#endif // QMIDIOUT_H
</code></pre>
<p>QMidi base class</p>
<pre><code>#ifndef QMIDI_H
#define QMIDI_H

#include &lt;QObject&gt;
#include &quot;RtMidi.h&quot;


class QMidi : public QObject
{
 Q_OBJECT

public:
 explicit QMidi(QObject *parent = nullptr) : QObject(parent) {};

 void openPort( unsigned int portNumber = 0, const QString &amp;portName = &quot;RtMidi&quot; ); // common methods
 void closePort(); // common methods

protected:
 RtMidi* rtMidi = nullptr; 
};
</code></pre>
<p>My solution is to create the objects in the derived classes and then assign the pointer of the base class:</p>
<p>QMidiOut constructor:</p>
<pre><code>rtMidiOut = new RtMidiOut();
rtMidi = static_cast&lt;RtMidi*&gt;(rtMidiOut);
</code></pre>
<p>QMidIn constructor:</p>
<pre><code>rtMidiIn = new RtMidiIn();
rtMidi = static_cast&lt;RtMidi*&gt;(RtMidiIn);
</code></pre>
<p>There is a better way to achieve this? The goal is to write all the common methods in a base class.</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79802663</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">How to integrate JaCoCo into a spring boot OCI image to measure E2E testing code coverage?</title> <category scheme="https://stackoverflow.com/tags" term="spring-boot" /> <category scheme="https://stackoverflow.com/tags" term="jacoco" /> <category scheme="https://stackoverflow.com/tags" term="buildpack" /> <author> <name>Janning Vygen</name> <uri>https://stackoverflow.com/users/351758</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79802663/how-to-integrate-jacoco-into-a-spring-boot-oci-image-to-measure-e2e-testing-code" /> <published>2025-10-28T10:34:15Z</published> <updated>2025-11-05T14:05:53Z</updated> <summary type="html"> <p>I am packaging my Spring Boot App with the <a href="https://docs.spring.io/spring-boot/gradle-plugin/packaging-oci-image.html" rel="nofollow noreferrer">Spring Boot gradle plugin</a>.</p>
<pre><code>tasks.bootBuildImage {
 builder.set(&quot;paketobuildpacks/builder-jammy-full:latest&quot;)
 imageName.set(devImageName)
 val systemParams = listOf(
 &quot;-Dfile.encoding=UTF-8&quot;,
 &quot;-Djava.awt.headless=true&quot;,
 &quot;-Djava.net.preferIPv4Stack=true&quot;,
 &quot;-XX:-OmitStackTraceInFastThrow&quot;,
 &quot;-XX:+HeapDumpOnOutOfMemoryError&quot;
 )
 val gcParams = listOf(
 &quot;-XX:+UnlockExperimentalVMOptions&quot;,
 &quot;-XX:+UseZGC&quot;,
 &quot;-XX:+UseLargePages&quot;,
 &quot;-XX:+DisableExplicitGC&quot;
 )
 val allParams = (systemParams + gcParams).joinToString(&quot; &quot;)
 environment.putAll(
 mapOf(
 &quot;BPE_DELIM_JAVA_TOOL_OPTIONS&quot; to &quot; &quot;,
 &quot;BPE_APPEND_JAVA_TOOL_OPTIONS&quot; to allParams,
 )
 )
}
</code></pre>
<p>After building this image I run a lot of End-to-End Tests with Cypress and Playwright. this works fine. The App itself is started as a docker container together with all other needed components like Database, Loadbalancer and so on. so I can relay test the final setup. And Cypress/Playwright itself run as a docker container.</p>
<p>But now I want to measure code coverage.</p>
<p>How can I add the Jacoco Lib to the Spring Boot Image and let it only activate when a given property is set?</p>
<p>I found the <a href="https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-buildpacks/services/buildpacks/release-notes-tanzu-jacoco-release-notes.html" rel="nofollow noreferrer">Tanzu Jacoco Build Pack</a>. Is this the right way?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79800345</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Expanding Spring Modulith tracing tags</title> <category scheme="https://stackoverflow.com/tags" term="spring-modulith" /> <author> <name>alturkovic</name> <uri>https://stackoverflow.com/users/5291611</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79800345/expanding-spring-modulith-tracing-tags" /> <published>2025-10-26T22:31:23Z</published> <updated>2025-11-05T14:07:30Z</updated> <summary type="html"> <p>I am using Spring Modulith 2.0.0-M3 with Spring Boot 4.0.0-RC1. I have enabled zipkin tracing export and I can see that Spring Modulith adds a <code>module.key</code> and <code>module.method</code> tags to the trace.</p>
<p>I would like to expand this with two more high-cardinality tags: bean name and class name of the invoked methods. I can see that Modulith has a package-private implementation: <code>DefaultModulithObservationConvention</code> which seems like something I want to extend to add these 2 new tags.</p>
<p>I can copy/paste the default implementation and add these 2 tags, but that seems like a bad way to go and I cannot find any documentation for this.</p>
<p>Is there a better way to add these 2 tags?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/79694833</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">How do I align controls after dragging on Android app?</title> <category scheme="https://stackoverflow.com/tags" term="java" /> <category scheme="https://stackoverflow.com/tags" term="android" /> <author> <name>Dana Bell</name> <uri>https://stackoverflow.com/users/4106573</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/79694833/how-do-i-align-controls-after-dragging-on-android-app" /> <published>2025-07-08T21:13:09Z</published> <updated>2025-11-05T14:06:30Z</updated> <summary type="html"> <p>I am trying to implement tile dragging of buttons.
The buttons are created dynamically once. There are 15 but only used if visible by assigning a letter to them.
They can be selected by tapping.
I also have methods that will shuffle or align.
Alignment is done by comparing the position of the buttons and evenly spacing them.</p>
<p>The problem is when I drag them they usually do not align after dragging even when I have align as part of the dragging code.
Second problem is the button is sometimes selected during the dragging process.</p>
<pre><code> // DRAGGING ROUTINES
 private class SingleTapConfirm extends GestureDetector.SimpleOnGestureListener {

 @Override
 public boolean onSingleTapUp(MotionEvent event) {
 return true;
 }
 }
</code></pre>
<pre><code> View.OnTouchListener mover = new View.OnTouchListener() {
 @Override
 public boolean onTouch(View v, MotionEvent event) {

 // dragging
 Log.e(&quot;MotionEvent&quot;, String.valueOf(event.getAction()));
 switch (event.getAction()) {

 case MotionEvent.ACTION_DOWN:
 case MotionEvent.ACTION_BUTTON_PRESS: //
 dX = v.getX() - event.getRawX();
 break;

 case MotionEvent.ACTION_MOVE:
 v.animate()
 .x(event.getRawX() + dX)
 .setDuration(0)
 .start();
 break;

 case MotionEvent.ACTION_OUTSIDE:
 case MotionEvent.ACTION_UP:
 case MotionEvent.ACTION_BUTTON_RELEASE: //
 case MotionEvent.ACTION_CANCEL: //
 default:
 Arrays.sort(buttons, new Comparator&lt;Button&gt;() {
 @Override
 public int compare(Button b1, Button b2) {
 if (b1.getX() &gt;= b2.getX()) return 1; // &gt;= gives b1 preference; 2 buttons cannot be in same place
 else return -1;
 }
 });
 alignButtons();
 break;
 }

 // single tap adds selected button letter to answer
 if (gestureDetector.onTouchEvent(event)) {
 addLetter(v);
 if (dragger)
 alignButtons();
 }
 return true;
 }
 };

</code></pre>
<pre><code> private void alignButtons() {
 Log.i(&quot;ButtonStart&quot;, Float.toString(buttonStart) );
 int seq = 0;
 for (int i = 0; i &lt; buttons.length; i++) {
 if (buttons[i].getVisibility() == View.VISIBLE) {
 float pos = buttonStart + (seq * buttonWidth);
 buttons[i].setX(pos);
 seq++;
 Log.i(buttons[i].getText().toString(), Float.toString(buttons[i].getX()));
 }
 }
 }

</code></pre>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/78609295</id> <re:rank scheme="https://stackoverflow.com">4</re:rank> <title type="text">Error when performing pod install command</title> <category scheme="https://stackoverflow.com/tags" term="ios" /> <category scheme="https://stackoverflow.com/tags" term="ruby" /> <category scheme="https://stackoverflow.com/tags" term="cocoapods" /> <author> <name>Raccoon</name> <uri>https://stackoverflow.com/users/10878461</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/78609295/error-when-performing-pod-install-command" /> <published>2024-06-11T18:48:18Z</published> <updated>2025-11-05T14:05:07Z</updated> <summary type="html"> <p>I installed Flutter with following the documentation at their website but when I want to run it and perform pod install I get this error. I tried changing version of Cocoapods but it doesn't work. Does anyone have an idea?</p>
<pre><code>Analyzing dependencies
firebase_analytics: Using Firebase SDK version '10.20.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.20.0' defined in 'firebase_core'
&lt;internal:/Users/name/.rbenv/versions/3.1.0/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb&gt;:85:in `require': cannot load such file -- xcodeproj (LoadError)
 from &lt;internal:/Users/name/.rbenv/versions/3.1.0/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb&gt;:85:in `require'
 from /Users/name/.pub-cache/hosted/pub.dev/firebase_crashlytics-3.4.13/ios/crashlytics_add_upload_symbols:1:in `&lt;main&gt;'
firebase_crashlytics: Using Firebase SDK version '10.20.0' defined in 'firebase_core'
firebase_dynamic_links: Using Firebase SDK version '10.20.0' defined in 'firebase_core'
firebase_performance: Using Firebase SDK version '10.20.0' defined in 'firebase_core'
Downloading dependencies
Installing Firebase (10.20.0)
Installing FirebaseABTesting (10.27.0)
Installing FirebaseAnalytics (10.20.0)
Installing FirebaseCore (10.20.0)
Installing FirebaseCoreExtension (10.27.0)
Installing FirebaseCoreInternal (10.27.0)
Installing FirebaseCrashlytics (10.20.0)
Installing FirebaseDynamicLinks (10.20.0)
Installing FirebaseInstallations (10.27.0)
Installing FirebasePerformance (10.20.0)
Installing FirebaseRemoteConfig (10.27.0)
Installing FirebaseRemoteConfigInterop (10.27.0)
Installing FirebaseSessions (10.27.0)
Installing FirebaseSharedSwift (10.27.0)
Installing Flutter (1.0.0)
Installing GTMSessionFetcher (2.3.0)
Installing GoogleAppMeasurement (10.20.0)
Installing GoogleDataTransport (9.4.1)
Installing GoogleMLKit (4.0.0)
Installing GoogleToolboxForMac (2.3.2)
Installing GoogleUtilities (7.13.3)
Installing GoogleUtilitiesComponents (1.1.0)
Installing MLImage (1.0.0-beta4)
Installing MLKitBarcodeScanning (3.0.0)
Installing MLKitCommon (9.0.0)
Installing MLKitTextRecognition (2.0.0)
Installing MLKitTextRecognitionCommon (1.0.0)
Installing MLKitVision (5.0.0)
Installing PromisesObjC (2.4.0)
Installing PromisesSwift (2.4.0)
Installing ReachabilitySwift (5.2.3)
Installing ScreenProtectorKit (1.3.1)
Installing camera_avfoundation (0.0.1)
Installing connectivity_plus (0.0.1)
Installing device_info_plus (0.0.1)
Installing firebase_analytics (10.8.4)
Installing firebase_core (2.25.3)
Installing firebase_crashlytics (3.4.13)
Installing firebase_dynamic_links (5.4.12)
Installing firebase_performance (0.9.3-12)
Installing flutter_native_splash (0.0.1)
Installing flutter_nfc_kit (2.0.0)
Installing flutter_secure_storage (6.0.0)
Installing google_mlkit_barcode_scanning (0.9.0)
Installing google_mlkit_commons (0.5.0)
Installing google_mlkit_text_recognition (0.10.0)
Installing libPhoneNumber-iOS (0.9.15)
Installing libphonenumber (0.0.1)
Installing nanopb (2.30909.1)
Installing package_info_plus (0.4.5)
Installing path_provider_foundation (0.0.1)
Installing permission_handler_apple (9.1.1)
Installing rive_common (0.0.1)
Installing screen_brightness_ios (0.1.0)
Installing screen_protector (1.2.1)
Installing share_plus (0.0.1)
Installing shared_preferences_foundation (0.0.1)
Installing smart_auth (0.0.1)
Installing sqflite (0.0.3)
Installing url_launcher_ios (0.0.1)
Generating Pods project
Integrating client project
</code></pre>
<h3>Command</h3>
<pre><code>/usr/local/bin/pod install
</code></pre>
<h3>Report</h3>
<ul>
<li><p>What did you do?</p>
</li>
<li><p>What did you expect to happen?</p>
</li>
<li><p>What happened instead?</p>
</li>
</ul>
<h3>Stack</h3>
<pre><code> CocoaPods : 1.13.0
 Ruby : ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23]
 RubyGems : 3.0.3.1
 Host : macOS 14.5 (23F79)
 Xcode : 15.4 (15F31d)
 Git : git version 2.39.3 (Apple Git-146)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
</code></pre>
<h3>Plugins</h3>
<pre><code>cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0
</code></pre>
<h3>Podfile</h3>
<pre class="lang-rb prettyprint-override"><code># Uncomment this line to define a global platform for your project
platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
 'Debug' =&gt; :debug,
 'Profile' =&gt; :release,
 'Release' =&gt; :release,
}

def flutter_root
 generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
 unless File.exist?(generated_xcode_build_settings_path)
 raise &quot;#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first&quot;
 end

 File.foreach(generated_xcode_build_settings_path) do |line|
 matches = line.match(/FLUTTER_ROOT\=(.*)/)
 return matches[1].strip if matches
 end
 raise &quot;FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get&quot;
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
 use_frameworks!
 use_modular_headers!

 flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
 target 'RunnerTests' do
 inherit! :search_paths
 end
end

post_install do |installer|
 installer.pods_project.targets.each do |target|
 flutter_additional_ios_build_settings(target)

 target.build_configurations.each do |config|
 config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
 '$(inherited)',

 ## dart: PermissionGroup.camera
 'PERMISSION_CAMERA=1',
 ]
 end
 end
end
</code></pre>
<h3>Error</h3>
<pre><code>REXML::ParseException - #&lt;TypeError: wrong argument type String (expected Regexp)&gt;
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/source.rb:220:in `scan'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/source.rb:220:in `match'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/baseparser.rb:227:in `pull_event'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/baseparser.rb:207:in `pull'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:23:in `parse'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:448:in `build'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:101:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:83:in `new'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:83:in `from_s'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:66:in `new_from_xcworkspace'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/user_project_integrator.rb:102:in `create_workspace'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/user_project_integrator.rb:71:in `integrate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:929:in `block in integrate_user_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:925:in `integrate_user_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:185:in `integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:170:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/bin/pod:55:in `&lt;top (required)&gt;'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `&lt;main&gt;'
...
wrong argument type String (expected Regexp)
Line: 1
Position: 38
Last 80 unconsumed characters:
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:96:in `rescue in parse'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:21:in `parse'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:448:in `build'
/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:101:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:83:in `new'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:83:in `from_s'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:66:in `new_from_xcworkspace'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/user_project_integrator.rb:102:in `create_workspace'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/user_project_integrator.rb:71:in `integrate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:929:in `block in integrate_user_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:925:in `integrate_user_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:185:in `integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:170:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.13.0/bin/pod:55:in `&lt;top (required)&gt;'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `&lt;main&gt;'
</code></pre>
<p>Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: undefined method `map' for nil:NilClass</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/76199688</id> <re:rank scheme="https://stackoverflow.com">2</re:rank> <title type="text">How to allocate more memory to pytorch</title> <category scheme="https://stackoverflow.com/tags" term="memory" /> <category scheme="https://stackoverflow.com/tags" term="pytorch" /> <category scheme="https://stackoverflow.com/tags" term="torch" /> <author> <name>Javed Akhtar</name> <uri>https://stackoverflow.com/users/6381004</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/76199688/how-to-allocate-more-memory-to-pytorch" /> <published>2023-05-08T10:29:48Z</published> <updated>2025-11-05T14:01:55Z</updated> <summary type="html"> <p>i keep getting Cuda out of memory errors, i have a 3090 with 24gb of vram, torch only allocates 7gb, 15gb is always free.</p>
<p><strong>RuntimeError: CUDA out of memory. Tried to allocate 92.00 MiB (GPU 0; 24.00 GiB total capacity; 6.90 GiB already allocated; 14.90 GiB free; 6.98 GiB reserved in total by PyTorch) If reserved memory is &gt;&gt; allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF</strong></p>
<p>i also checked nvidia smi if any other process was taking up memory, found none</p>
<p><a href="https://i.sstatic.net/A9abM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/A9abM.png" alt="enter image description here" /></a></p>
<p>this was peak mem usage before it gave me the error</p>
<p>any help?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/76146837</id> <re:rank scheme="https://stackoverflow.com">19</re:rank> <title type="text">A fatal esptool.py error occurred: Cannot configure port. PermissionError(13, 'A device attached to the system is not functioning.', None, 31)</title> <category scheme="https://stackoverflow.com/tags" term="esp8266" /> <category scheme="https://stackoverflow.com/tags" term="arduino-esp8266" /> <category scheme="https://stackoverflow.com/tags" term="permissionerror" /> <category scheme="https://stackoverflow.com/tags" term="esptool" /> <author> <name>Krshnapriy</name> <uri>https://stackoverflow.com/users/21786912</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/76146837/a-fatal-esptool-py-error-occurred-cannot-configure-port-permissionerror13-a" /> <published>2023-05-01T12:13:43Z</published> <updated>2025-11-05T14:09:08Z</updated> <summary type="html"> <p>I am using a windows OS and I tried running a .ino code in arduino IDE for ESP8266 and came across the following error while trying to upload the code to ESP8266.</p>
<blockquote>
<p>A fatal esptool.py error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)</p>
</blockquote>
<p>I got to know that this error is being encountered by many people right now. I've used arduino IDE with esp8266 for some time now and this is the first time such an error has popped up. And I think it has something to do with the libraries or drivers installed while setting up the arduino IDE for ESP8266.</p>
<ul>
<li>Tried disconnecting the ESP8266 from my laptop and reconnecting it to a different USB port.</li>
<li>Tried resetting the esp8266 using the RESET button to check if it was because of the hardware.</li>
<li>Tried running the Arduino IDE as an administrator.</li>
</ul>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/71420124</id> <re:rank scheme="https://stackoverflow.com">20</re:rank> <title type="text">How do I solve this empty git commit warning?</title> <category scheme="https://stackoverflow.com/tags" term="git" /> <category scheme="https://stackoverflow.com/tags" term="git-commit" /> <category scheme="https://stackoverflow.com/tags" term="githooks" /> <category scheme="https://stackoverflow.com/tags" term="husky" /> <category scheme="https://stackoverflow.com/tags" term="lint-staged" /> <author> <name>KYin</name> <uri>https://stackoverflow.com/users/17156530</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/71420124/how-do-i-solve-this-empty-git-commit-warning" /> <published>2022-03-10T07:15:07Z</published> <updated>2025-11-05T14:00:14Z</updated> <summary type="html"> <p>After pushing my code to the remote branch and creating a PR. I wanted to make some more changes to my code and then commit to the remote branch again</p>
<p>First, I started these steps:</p>
<pre><code>git add .
git commit -m &quot;Remove semicolons, change to multi line returns&quot;`
</code></pre>
<p>But then this appeared right after the commit:
<a href="https://i.sstatic.net/TbM4g.png" rel="noreferrer"><img src="https://i.sstatic.net/TbM4g.png" alt="enter image description here" /></a></p>
<p>I checked the status and unstage all the added files</p>
<pre><code>git status
git restore --stage .
</code></pre>
<p>-&gt; Then I add and commit again, the error is still there.</p>
<p>After that, I undo the commits &amp; pull the branch to start again</p>
<pre><code>git reset HEAD^
git pull
</code></pre>
<p>When I'm done making changes to the code, I ran <code>git diff</code> to see the changes I've made.
Finally, I ran <code>git add .</code> &amp; <code>git commit -m &quot;Recommit message&quot;</code>, but somehow the error came back</p>
<hr />
<p>Can anyone help me with what actually happened and how can I fix it?</p>
<p>If we can't fix it, is there any way to revert the code to normal?</p>
<p>Thank you!</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/58638113</id> <re:rank scheme="https://stackoverflow.com">16</re:rank> <title type="text">How to find out about unused dependencies Maven in Intellij Idea</title> <category scheme="https://stackoverflow.com/tags" term="maven" /> <category scheme="https://stackoverflow.com/tags" term="intellij-idea" /> <category scheme="https://stackoverflow.com/tags" term="build" /> <category scheme="https://stackoverflow.com/tags" term="dependencies" /> <category scheme="https://stackoverflow.com/tags" term="pom.xml" /> <author> <name>Vytsalo</name> <uri>https://stackoverflow.com/users/12152034</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/58638113/how-to-find-out-about-unused-dependencies-maven-in-intellij-idea" /> <published>2019-10-31T06:48:05Z</published> <updated>2025-11-05T14:08:01Z</updated> <summary type="html"> <p>My project is growing, but I have many unused dependencies. How do I find out which I really need, and which are really useless? Are there some Intellij Idea Extensions?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/49758680</id> <re:rank scheme="https://stackoverflow.com">13</re:rank> <title type="text">nextjs - use _error.js in dev mode</title> <category scheme="https://stackoverflow.com/tags" term="error-handling" /> <category scheme="https://stackoverflow.com/tags" term="next.js" /> <author> <name>mokk</name> <uri>https://stackoverflow.com/users/1005750</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/49758680/nextjs-use-error-js-in-dev-mode" /> <published>2018-04-10T16:29:54Z</published> <updated>2025-11-05T14:01:55Z</updated> <summary type="html"> <p>So I am creating a custom error page on my nextjs application.
Following the documentation, I created a <code>_error.js</code> file with my view in it (in <code>React</code>)</p>

<p>My issue is when I am in dev mode, my <code>_error</code> page is completely ignored (even though it goes through its <code>getInitialProps</code>). The <code>render</code> function seems to be ignored and instead <code>nextjs</code> seems to be using its internal <code>error-debug</code> page.</p>

<p>If I am right, that is what this code says <a href="https://github.com/zeit/next.js/blob/9ec81c00fad040154df571701b73cb6e3b1b86fa/server/render.js" rel="noreferrer">from the repo</a> (line 84 for the current version)</p>

<p>When I build with as a <code>production</code> env, no problem, my custom error page is picked up.</p>

<p>Any idea on how to render my custom error page in dev mode ?</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/44036529</id> <re:rank scheme="https://stackoverflow.com">0</re:rank> <title type="text">Rename duplicate files using Python</title> <category scheme="https://stackoverflow.com/tags" term="python" /> <category scheme="https://stackoverflow.com/tags" term="python-3.x" /> <category scheme="https://stackoverflow.com/tags" term="python-3.6" /> <author> <name>Andre Korol</name> <uri>https://stackoverflow.com/users/6692816</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/44036529/rename-duplicate-files-using-python" /> <published>2017-05-18T00:00:53Z</published> <updated>2025-11-05T14:00:07Z</updated> <summary type="html"> <p>I'm trying to write a Python script that renames all duplicate file names recursively (i.e. inside all directories)
I already searched the web and Stack Overflow but I couldn't find any answer...
Here's my code:</p>

<pre><code>#!/usr/bin/env python3.6
import os
import glob

path = os.getcwd()
file_list = []
duplicates={}

# remove filename duplicates
for file_path in glob.glob(path + "/**/*.c", recursive=True):
 file = file_path.rsplit('/', 1)[1]
 if file not in file_list:
 file_list.append(file)
 else:
 if file in duplicates.keys():
 duplicates[file] += 1
 lista = []
 lista.append(file_path)
 os.rename(file_path, file_path.rsplit('/', 1)[:-1] + '/' + str(duplicates[file]) + file)
 else:
 duplicates[file] = 1
 os.rename(file_path, file_path.rsplit('/', 1)[:-1] + '/' + str(duplicates[file]) + file)
</code></pre>

<p>And this is the error I'm getting:</p>

<pre><code>Traceback (most recent call last):
 File "/home/andre/Development/scripts/removeDuplicates.py", line 22, in &lt;module&gt;
 os.rename(file_path, file_path.rsplit('/', 1)[:-1] + '/' + str(duplicates[file]) + file)
TypeError: can only concatenate list (not "str") to list
</code></pre>

<p>I know why I'm getting this error, but my question is: Is there a more clever way to do this? I'd also like to rename all duplicate directory names, but I still didn't figure it out...</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/38143653</id> <re:rank scheme="https://stackoverflow.com">3</re:rank> <title type="text">EF Migrations - There is already an object named '' in the database</title> <category scheme="https://stackoverflow.com/tags" term="c#" /> <category scheme="https://stackoverflow.com/tags" term="entity-framework" /> <category scheme="https://stackoverflow.com/tags" term="migration" /> <category scheme="https://stackoverflow.com/tags" term="entity-framework-migrations" /> <author> <name>Cathal O 'Donnell</name> <uri>https://stackoverflow.com/users/4568980</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/38143653/ef-migrations-there-is-already-an-object-named-in-the-database" /> <published>2016-07-01T10:56:58Z</published> <updated>2025-11-05T14:01:55Z</updated> <summary type="html"> <p>I am having trouble adding a new table to my database. these are the commands I entered when trying to add the new migration:</p>

<pre><code>Add-Migration AdminSett
</code></pre>

<blockquote>
 <p>Scaffolding migration 'AdminSett'. The Designer Code for this
 migration file includes a snapshot of your current Code First model.
 This snapshot is used to calculate the changes to your model when you
 scaffold the next migration. If you make additional changes to your
 model that you want to include in this migration, then you can
 re-scaffold it by running 'Add-Migration AdminSett' again.</p>
</blockquote>

<pre><code>Update-Database AdminSett
</code></pre>

<blockquote>
 <p>Specify the '-Verbose' flag to view the SQL statements being applied
 to the target database. Applying explicit migrations:
 [201607011035464_AdminSett]. Applying explicit migration:
 201607011035464_AdminSett. System.Data.SqlClient.SqlException
 (0x80131904): There is already an object named 'AdminSettings' in the
 database. at
 System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
 Boolean breakConnection, Action<code>1 wrapCloseInAction) at
 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
 exception, Boolean breakConnection, Action</code>1 wrapCloseInAction) at
 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
 stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at
 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior,
 SqlCommand cmdHandler, SqlDataReader dataStream,
 BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
 stateObj, Boolean&amp; dataReady) at
 System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String
 methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at
 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource<code>1
 completion, String methodName, Boolean sendToPipe, Int32 timeout,
 Boolean asyncWrite) at
 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at
 System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.&lt;NonQuery&gt;b__0(DbCommand
 t, DbCommandInterceptionContext</code>1 c) at
 System.Data.Entity.Infrastructure.Interception.InternalDispatcher<code>1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget
 target, Func</code>3 operation, TInterceptionContext interceptionContext,
 Action<code>3 executing, Action</code>3 executed) at
 System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand
 command, DbCommandInterceptionContext interceptionContext) at
 System.Data.Entity.Internal.InterceptableDbCommand.ExecuteNonQuery()<br>
 at
 System.Data.Entity.Migrations.DbMigrator.ExecuteSql(MigrationStatement
 migrationStatement, DbConnection connection, DbTransaction
 transaction, DbInterceptionContext interceptionContext) at
 System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ExecuteSql(MigrationStatement
 migrationStatement, DbConnection connection, DbTransaction
 transaction, DbInterceptionContext interceptionContext) at
 System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable<code>1
 migrationStatements, DbConnection connection, DbTransaction
 transaction, DbInterceptionContext interceptionContext) at
 System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsWithinTransaction(IEnumerable</code>1
 migrationStatements, DbTransaction transaction, DbInterceptionContext
 interceptionContext) at
 System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsWithinNewTransaction(IEnumerable<code>1
 migrationStatements, DbConnection connection, DbInterceptionContext
 interceptionContext) at
 System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable</code>1
 migrationStatements, DbConnection connection, DbInterceptionContext
 interceptionContext) at
 System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable<code>1
 migrationStatements, DbConnection connection) at
 System.Data.Entity.Migrations.DbMigrator.&lt;&gt;c__DisplayClass30.&lt;ExecuteStatements&gt;b__2e()
 at
 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.&lt;&gt;c__DisplayClass1.&lt;Execute&gt;b__0()
 at
 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func</code>1
 operation) at
 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action
 operation) at
 System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable<code>1
 migrationStatements, DbTransaction existingTransaction) at
 System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable</code>1
 migrationStatements) at
 System.Data.Entity.Migrations.Infrastructure.MigratorBase.ExecuteStatements(IEnumerable<code>1
 migrationStatements) at
 System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String
 migrationId, VersionedModel targetModel, IEnumerable</code>1 operations,
 IEnumerable<code>1 systemOperations, Boolean downgrading, Boolean auto)<br>
 at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration
 migration, DbMigration lastMigration) at
 System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ApplyMigration(DbMigration
 migration, DbMigration lastMigration) at
 System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable</code>1
 pendingMigrations, String targetMigrationId, String lastMigrationId)<br>
 at
 System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1
 pendingMigrations, String targetMigrationId, String lastMigrationId)<br>
 at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String
 targetMigration) at
 System.Data.Entity.Migrations.DbMigrator.&lt;>c__DisplayClassc.b__b()
 at
 System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action
 mustSucceedToKeepDatabase) at
 System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists(Action
 mustSucceedToKeepDatabase) at
 System.Data.Entity.Migrations.DbMigrator.Update(String
 targetMigration) at
 System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String
 targetMigration) at
 System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run() 
 at System.AppDomain.DoCallBack(CrossAppDomainDelegate
 callBackDelegate) at
 System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)<br>
 at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner
 runner) at
 System.Data.Entity.Migrations.Design.ToolingFacade.Update(String
 targetMigration, Boolean force) at
 System.Data.Entity.Migrations.UpdateDatabaseCommand.&lt;>c__DisplayClass2.&lt;.ctor>b__0()
 at
 System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action
 command) ClientConnectionId:dec63212-4546-48a9-bf8e-9e2b8548fcf3 Error
 Number:2714,State:6,Class:16 There is already an object named
 'AdminSettings' in the database.</p>
</blockquote>

<p>Also in the _Migrations table in the database I there is no row for the migration with the name: AdminSett</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/35799307</id> <re:rank scheme="https://stackoverflow.com">1</re:rank> <title type="text">Create an IsFirstItem and IsLastItem IValueConverter for object collection bindings</title> <category scheme="https://stackoverflow.com/tags" term="c#" /> <category scheme="https://stackoverflow.com/tags" term="wpf" /> <category scheme="https://stackoverflow.com/tags" term="ivalueconverter" /> <author> <name>Wobbles</name> <uri>https://stackoverflow.com/users/3797778</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/35799307/create-an-isfirstitem-and-islastitem-ivalueconverter-for-object-collection-bindi" /> <published>2016-03-04T15:07:13Z</published> <updated>2025-11-05T14:00:01Z</updated> <summary type="html"> <p>The end goal to be able to set a specific <code>ItemContainerStyle</code> on the first and last element in my list box;</p>

<p>The converters thus far are:</p>

<pre><code>public class IsFirstItemConverter : IValueConverter
{
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
 bool result = false;
 result = ((IList&lt;object&gt;)parameter).First() == value;

 return result;
 }

 public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
 throw new NotImplementedException();
 }
}
public class IsLastItemConverter : IValueConverter
{
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
 bool result = false;
 result = ((IList&lt;object&gt;)parameter).Last() == value;

 return result;
 }

 public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
 throw new NotImplementedException();
 }
}
</code></pre>

<p>And implementation:</p>

<pre><code>&lt;DataTrigger Value="True" Binding="{Binding Converter={StaticResource IsFirstItemConverter},ConverterParameter=Items, ElementName=SubItems}"&gt;
 &lt;Setter Property="Template"&gt;
 &lt;Setter.Value&gt;
 &lt;ControlTemplate TargetType="{x:Type ListBoxItem}"&gt;
 &lt;StackPanel Orientation="Horizontal"&gt;
 &lt;TextBlock Text="First"/&gt;
 &lt;ContentPresenter/&gt;
 &lt;/StackPanel&gt;
 &lt;/ControlTemplate&gt;
 &lt;/Setter.Value&gt;
 &lt;/Setter&gt;
&lt;/DataTrigger&gt;
</code></pre>

<p>And the error is:</p>

<blockquote>
 <p>InvalidCastException: Unable to cast object of type 'System.String' to
 type 'System.Collections.Generic.IList`1[System.Object]'.</p>
</blockquote>

<p>Im sure I screwed up in multiple spots, just not experienced enough with XAML and bindings to narrow down where.</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/35670616</id> <re:rank scheme="https://stackoverflow.com">3</re:rank> <title type="text">Gridlayout not showing, Android studio</title> <category scheme="https://stackoverflow.com/tags" term="android" /> <category scheme="https://stackoverflow.com/tags" term="android-gridlayout" /> <author> <name>Ciprian Iacob</name> <uri>https://stackoverflow.com/users/5990295</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/35670616/gridlayout-not-showing-android-studio" /> <published>2016-02-27T13:52:37Z</published> <updated>2025-11-05T14:01:55Z</updated> <summary type="html"> <p>I'm trying to create an app in android studio, and for some reasons one gridLayout decides not to show up, despite the fact that it takes the necessary space on the screen. <a href="https://i.sstatic.net/DxhVV.png" rel="nofollow">Image from android studio</a>, <a href="https://i.sstatic.net/08Ez3.jpg" rel="nofollow">actual screenshot from my phone</a></p>

<p>XML file of the layout:
<div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:background="#cbcde6"
 android:orientation="vertical"
 android:gravity="top|center"&gt;
 &lt;TextView
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="Insert data"
 android:textAppearance="?android:attr/textAppearanceLarge"
 /&gt;

 &lt;GridLayout
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:orientation="horizontal"
 android:layout_gravity="top"
 android:columnCount="3"
 android:rowCount="3"
 android:visibility="visible"&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;
 &lt;EditText
 android:background="#ffffff"
 android:layout_height="30sp"
 android:layout_margin="15dp"
 android:layout_columnWeight="1"/&gt;

 &lt;/GridLayout&gt;

 &lt;LinearLayout
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:orientation="vertical"
 android:gravity="center"&gt;
 &lt;Button
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="Calculate"
 android:textAppearance="?android:attr/textAppearanceLarge"/&gt;
 &lt;LinearLayout
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:orientation="horizontal"
 android:gravity="center"
 &gt;
 &lt;TextView
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="Result is: "
 android:textAppearance="?android:attr/textAppearanceLarge"/&gt;
 &lt;TextView
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="Result"
 android:textAppearance="?android:attr/textAppearanceLarge"/&gt;

 &lt;/LinearLayout&gt;

 &lt;/LinearLayout&gt;

 &lt;LinearLayout
 android:layout_width="wrap_content"
 android:layout_height="match_parent"
 android:gravity="bottom"&gt;
 &lt;Button
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="@string/backButton_text"
 android:id="@+id/back"
 android:onClick="onClickBackButton"
 android:textAppearance="?android:attr/textAppearanceLarge"/&gt;

 &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;</code></pre>
</div>
</div>
</p>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/31479661</id> <re:rank scheme="https://stackoverflow.com">1</re:rank> <title type="text">Menu toggle functions on second click</title> <category scheme="https://stackoverflow.com/tags" term="javascript" /> <category scheme="https://stackoverflow.com/tags" term="html" /> <category scheme="https://stackoverflow.com/tags" term="jquery" /> <category scheme="https://stackoverflow.com/tags" term="css" /> <author> <name>user3260487</name> <uri>https://stackoverflow.com/users/3260487</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/31479661/menu-toggle-functions-on-second-click" /> <published>2015-07-17T15:43:21Z</published> <updated>2025-11-05T14:09:48Z</updated> <summary type="html"> <p>Menu toggle working on second click. If it is opened sometimes it goes away. It is not consistent. </p>

<pre><code>f("#smt, #smp .s-panel--close").on("click", function(s) {
 s.preventDefault();
 A.toggleClass("sidemenu-opened")
});
f("#mmt, #main-nav-mobile .s-panel--close").on("click", function(s) {
 s.preventDefault();
 A.toggleClass("mm-opened")
});
f(".bs-docs-example").each(function(s, K) {
 var J = f(K),
 L = '&lt;a href="#" class="togglecode"&gt;&lt;/a&gt;';
 if (J.next().is("pre")) {
 J.addClass("withcode");
 J.append(L);
 J.find(".togglecode").on("click", function(M) {
 M.preventDefault();
 J.toggleClass("opened")
 })
 }
});
</code></pre>

<p>HTML:</p>

<pre><code> &lt;li&gt;
 &lt;a href="javascript:void(0);" id="smt" class="headericon mobilenav-icon"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;
 &lt;/li&gt;
</code></pre>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/28817992</id> <re:rank scheme="https://stackoverflow.com">74</re:rank> <title type="text">How to set bool pointer to true in struct literal?</title> <category scheme="https://stackoverflow.com/tags" term="pointers" /> <category scheme="https://stackoverflow.com/tags" term="go" /> <category scheme="https://stackoverflow.com/tags" term="struct" /> <category scheme="https://stackoverflow.com/tags" term="literals" /> <author> <name>The user with no hat</name> <uri>https://stackoverflow.com/users/3257971</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/28817992/how-to-set-bool-pointer-to-true-in-struct-literal" /> <published>2015-03-02T19:31:54Z</published> <updated>2025-11-05T13:59:26Z</updated> <summary type="html"> <p>I have the function below which accepts a bool pointer. I'm wondering if there is any notation which allows me to set the value of the <code>is</code> field to <code>true</code> in the struct literal; basically without to define a new identifier <code>(i.e. var x := true ; handler{is: &amp;x} )</code></p>

<pre><code>package main

import "fmt"

func main() {
 fmt.Println("Hello, playground")
 check(handler{is: new(bool) })
}


type handler struct{
 is *bool
}

func check(is handler){}
</code></pre>
 </summary> </entry> <entry> <id>https://stackoverflow.com/q/12529567</id> <re:rank scheme="https://stackoverflow.com">8</re:rank> <title type="text">PHP - Count all elements of an Array that Satisfy a Condition [duplicate]</title> <category scheme="https://stackoverflow.com/tags" term="php" /> <category scheme="https://stackoverflow.com/tags" term="arrays" /> <author> <name>Daniel Kilburn</name> <uri>https://stackoverflow.com/users/1688647</uri> </author> <link rel="alternate" href="https://stackoverflow.com/questions/12529567/php-count-all-elements-of-an-array-that-satisfy-a-condition" /> <published>2012-09-21T11:25:43Z</published> <updated>2025-11-05T14:05:33Z</updated> <summary type="html"> <p>I've created a mysql query that pulls through several products, all with the following information:</p>
<p>Product ID
Product Name
Product Price
and
Product Category</p>
<p>Further down the page, I've looped through these with a foreach and a few 'ifs' so it only displays those products where the name contains 'x' in one div and displays those products where the name contains 'y' in another div.</p>
<p>I'm struggling to count how many products are going to be in each div before I do the loop.</p>
<p>So essentially, what I'm asking is:</p>
<p><strong>How do you count all elements in an array that satisfy a certain condition?</strong></p>
<p>Added Code which shows the loop:</p>
<pre><code>&lt;div id=&quot;a&quot;&gt;
 &lt;?php
 $i = 1;
 foreach ($products AS $product) {
 if (strpos($product-&gt;name,'X') !== false) {
 =$product-&gt;name
 }
 $i++;
 } ?&gt;
&lt;/div&gt;

&lt;div id=&quot;b&quot;&gt;
 $i = 1;
 foreach ($products AS $product) {
 if (strpos($product-&gt;name,'Y') !== false) {
 =$product-&gt;name
 }
 $i++;
 } ?&gt;
&lt;/div&gt;
</code></pre>
<p>I'd like to know how many of these are going to be in here before I actually do the loop.</p>
 </summary> </entry></feed>If you would like to create a banner that links to this page (i.e. this validation result), do the following:
Download the "valid Atom 1.0" banner.
Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)
Add this HTML to your page (change the image src attribute if necessary):
If you would like to create a text link instead, here is the URL you can use:
http://www.feedvalidator.org/check.cgi?url=http%3A//stackoverflow.com/feeds