title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Junk characters coming in from pinvoke WM_GETTEXT
<p>I have a method set that uses pinvoke to call WM_GETTEXT on another program's textbox - and it works fairly well, but frequently I just get back total junk text appended to the end of it. (The ORIGINAL text is always intact.)</p> <p>This is random, I cannot reproduce it on demand, but it is frequent enough to be st...
2
1,657
LINQ to Objects, query arrays in object
<p>I need to query an array. I have tried to use LINQ but with no success.</p> <p>Here is a simplified structure of Insurance </p> <pre><code>Public Class Insurance Public _typ As String Public _numb As Number() Public _indi As Indicator() End Class Public Class Number Sub New(ByVal n ...
2
1,130
ComboBox does not select proper item when bound to CompositeCollection
<p>I have a ComboBox bound to a collection of animals. From it I select my favourite animal. I need a static null item above the bound items. I declare it using a CompositeCollection. When the ComboBox is bound it <strong>does not select my initial favourite animal. How can I fix that?</strong> Similar problem <a href=...
2
1,361
Add an element to the fully loaded DOM with Chrome extension
<p>I'm making a simple chrome extension that adds a form element to a page. I want to put the form in a specific place, right above some other elements that are loaded by JS on the page. So, my plan was to wait until all of these elements had been loaded, then insert my form, but this works very inconsistently. </p> ...
2
1,108
Why are my Items in ListView not Clickable?
<p>Items on my list view are not clickable I have tried to getcurrentfocus() and blocking descendants in RelativeLayout tag in content_palce.xml. All I want from the list is two functions:</p> <ol> <li>When I click the item another activity is started.</li> <li>When a long press happens a context menu is shown.</li> <...
2
7,789
Pop-up window Over SVG Map on-hover or on-click
<p><strong>See Update below</strong></p> <p>I'm trying to code an interactive map of California by county. When a user hovers or clicks (I haven't decided which yet) over a county, a tooltip or pop-up window will appear with data specific to that county.</p> <p>I'm working with an inline SVG file I found on Wikipedia...
2
2,163
Librosa: Cannot provide window function for mfcc on Windows
<p>I'm currently experimenting with librosa to reproduce an scientific approach (deep learning) that used PRAAT to extract the MFCCs of audio files. I'm not that experienced with phonetics/acoustics and I had a lot of issues understanding PRAAT - so I started using librosa whose API was more "accessible" for me.</p> <...
2
1,080
azure removes Access-Control-Allow-Origin header returned from my app service
<p>I have two services running on Azure :</p> <ul> <li>a <strong>web service</strong> ( angular app / expressjs ) </li> <li>an <strong>app service</strong> ( aspnet core app )</li> </ul> <p>All the <strong>web service</strong> does is query the <strong>app service</strong> for the following endpoint : <code>my-app-se...
2
2,997
set text of edittext in child of expandablelistview with button edits both groups children edittext boxes
<p>I have a EditText field in my child view for the expandablelistview that is changed with a button. the layout is like this</p> <p>Breakfast (group) subtractBTN EditText addBTN (child) position 0</p> <p>Lunch (group) subtractBTN EditText addBTN (child) position 0 of second level</p> <p>Now every time I hit the...
2
1,135
Dynamically created text boxes not submitting values to php form
<p>I've a form in which there are a few elements that i have added through Jquery(dynamically) but the problem is that apart from those variable everything is getting POSTED into the PHP action-file.</p> <p>I want to get the values of these text boxes in the php file.</p> <p><strong>CODE:</strong><br> <strong>Jquery ...
2
1,358
Trying to retrieve users profile picture from mysql database.
<p>I'm having an issue trying to retrieve the users profile link that is stored in MYSQL database. </p> <p>I tried running this code to select the userprofile (where the users profile picture link is stored) but it came up with a 500 error. </p> <pre><code> &lt;?php $stmt = $DB_con-&gt;prepare('SELECT id, ...
2
1,260
Ubuntu Apache Using Wrong VHosts For Sites
<p>I'm using Ubuntu 16.0.4, and have vhost configured, with all .conf files located at <code>/etc/apache2/sites-available</code> and all enabled sites at <code>/etc/apache2/sites-enabled</code> using <code>a2ensite</code> for each site conf. I have 000-default.conf disabled, and I'm using certbot, along with the latest...
2
2,406
Oozie Pig action stuck in PREP state and job is in RUNNING state
<p>I want to run a simple workflow but it gets stuck in PREP state every time i submit the job. Here i am trying to read the values from text file which are comma separated and print them on screen. Fot this i am using following properties file, workflow file and script file.</p> <p>Environment:<br> Hadoop: 2.6.0 (1 n...
2
1,801
Few general questions about "org.eclipse.wst.server.core" folder of a web application in Java
<p>I have a few questions regarding the <strong>org.eclipse.wst.server.core</strong> folder in <code>.metadata\.plugins</code> folder in a eclipse work space. I know that while running an application in local host, this is the folder where we have to replace files for front end, like <code>JSP</code>, <code>JS</code> f...
2
1,151
ListView from SQLite with EditText and CheckBox in each row
<p>I've an ListView with data from SQLite that works correctly. Now I want to add more things to this list. To each row I want to add EditText and CheckBox. Something like this:</p> <hr> <p>item1 CheckBox</p> <p>EditText</p> <hr> <p>item2 CheckBox</p> <p>EditText</p> <hr> <p>This is my List Class:</p> <pre><...
2
1,583
Performance of Multiple Parallel (async) SqlBulkCopy inserts, against different tables, in a single Transaction
<h1>TL;DR</h1> <p><strong>Why does running multiple SqlBulkCopy inserts, against unrelated tables, <code>async</code> &amp; in parallel, on a single Transaction seem to behave as though it's running in series instead?</strong></p> <hr> <h1>Context</h1> <p>I have some code that is calculating and storing a large volume ...
2
2,369
I am Trying to add date picker in dropdownbutton in flutter but when I press the button the date picker isn't opening
<p>i am trying to add a date picker function inside a alert dialogue in flutter , the date picker should open when i press the dropdown button but its not opening i've used date picker function inside on changed function do i have to also use drop down menu item I've also added the screenshot below please have a look <...
2
2,323
Cannot get Microsoft.Owin to connect with Identity Server 4
<p>I have a MVC5 ASP.Net web application that I want to use OAuth2 OpenId Connect via IdentityServer4. So my startup file in the web project is;</p> <pre><code>using Microsoft.Owin.Security.Cookies; using Microsoft.Owin.Security.OpenIdConnect; using Owin; using SIR.API.Caller.Helpers; namespace SIR.API.Caller { p...
2
3,100
OpenGL multiple matrix transormations
<p>I have simple vertex shader for models</p> <pre><code>#version 330 layout(location = 0) in vec3 VertexPosition; layout(location = 1) in vec3 VertexNormal; layout(location = 2) in vec2 VertexUV; out VS_GS_VERTEX { vec3 vs_worldpos; vec3 vs_normal; vec2 VertexUV; } vertex_out; uniform mat4 modelMatrix;...
2
1,312
Importing an array using Python
<p>I have an array <code>Pe</code> with dimensions <code>(2,3,3)</code>. I am importing Pe but then I want the code to calculate for each Pe and give me visited indices. Right now, I have to manually add <code>Pe.Pe[0]</code>,<code>Pe.Pe[1]</code> in the line <code>Visited_Indices,timestamps=iterate_array(0,0, Pe.Pe[0]...
3
1,050
Why can't my code run this code onto python?
<p>I am running this code on Python 3(IDLE) on my raspberry pi 3 whith the latest raspbian software. With this code I am trying to obtain temperature data through ds18b20 sensor and sending that same data towards the mysql database I created.</p> <p>Help would be very much appreciated!</p> <p>All that is getting exec...
3
1,322
rails submit check box with matching select
<p>I have a form that is displaying dates and times like so <a href="https://i.stack.imgur.com/6A6NN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6A6NN.png" alt="enter image description here"></a></p> <p>The code for it looks like this:</p> <pre><code> &lt;%= f.fields_for :availabilities do |ff|...
3
1,167
Count occurence of a string in a list and display it in console
<p>I'm creating a Logparser right now i'm able to go trought all the file in a folder line by line and extracting the substring i wanted which is the value after <code>"fct="</code>. All that using <code>Regex</code> and i put the result in a <code>List</code>. Now i want to <code>Count</code> the occurence of every st...
3
1,381
Disable auto-login after student registration in Tutor LMS
<p>How do I stop WordPress auto-login after completing a new student registration in Tutor LMS? I think tutor_before_student_reg_form, tutor_student_reg_form_end, tutor_after_student_reg_form are functions that have something to do with it but I do not know where to find them.</p> <p>Can anyone please give a lead? Than...
3
4,290
Else condition is not working in javascript
<p>I'm a beginner to JavaScript. Can someone help me in this regard?</p> <p>In the below code the logic for submit button doesn't work. <code>_btn.addEventListener</code>. Only the if part is getting executed, some issue with the else part condition. If the "if" condition gets satisfied then the alert is getting exec...
3
1,241
Operator Overload With Pointers
<p>As a part of our exam review package for next week, we are asked to understand pointers in overloaded operators-- something I am finding it very difficult to get and the instructor is refusing to give us any example, and asking his for independent study.</p> <p>Apparently we will be having one of these problems on ...
3
3,196
Keep User Logged In in swift
<p>I developed app where I open firstly UIViewController with login system, here in viewDidLoad I chech if user loggined in (with firebase) like that</p> <pre><code>override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .systemBackground if Auth.auth().currentUser == nil{ let tap ...
3
1,163
My Android Application keeps crashing. Kotlin and Android Studio
<p>I am new to Kotlin and Android Studio. I tried implementing Fragments and Navigation in my application. Following is my code. When the Application is run, it keeps on crashing. I don't understand where I ve made mistake. The application does not show any compilation error. MainActivity.kt : package com.example.firs...
3
1,162
UWP HID SendOutputReport always returns access denied, requires ReadWrite permissions
<p>I'm trying to read a Wii Remote using the HID class, in a UWP app (C# .net), similar to <a href="https://channel9.msdn.com/coding4fun/articles/Managed-Library-for-Nintendos-Wiimote" rel="noreferrer">this</a>.</p> <p>However, I can't seem to do much, as I can't get a Write-capable HID handle, which is required to do...
3
1,323
My dialog box produces an error when clicked
<p>I am trying to open a dialog when user clicks on the mail icon. However, everything seems to work but I get an error on console included below:</p> <pre><code> index.js:1 Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode. Instead, add a r...
3
1,795
Location Manager not working in android 4.4.4
<p>Android amateur and first time posting here. I'm developing an app that get's the GPS location of the user and then sends to a Mysql database. On Android 7.1 (Samsung note 5) it works perfectly but when I try to use in Android 4.2.2 (Samsung J1) the location doesn't update.</p> <p>Below my MapsActivity.java </p> ...
3
3,322
UpdatePanel with Button / LinkButton doesnt work
<p>Im trying to resolve an issue with a button / link-button (both doesnt work). The problem is the following:</p> <p>I have a navigation menu where the user can choose the "tab" (view of Multiview) where he wants to be redirected to. In this menu i have some buttons / link-buttons which should update the updatepanel...
3
1,344
Why do i get NullPointerException when i try to create object by POST method?
<p>I`ve been coding some REST API tests, and i dont know either i wrote my test wrong or my POST method is invalid. Im getting this error when i perform the test: </p> <blockquote> <p>ERROR [2015-12-14 21:37:00,309] org.glassfish.grizzly.servlet.ServletHandler: service exception: ! java.lang.NullPointerException:...
3
1,169
How to include dependency classes in my eclipse(juno) project?
<p>I have kept all my jar files inside <code>Web-content/WEB-INF/lib</code> and build into <code>Java-Resources/Libraries</code>. My project has been working fine for last 2 weeks, however, suddenly today all the dependencies are throwing <code>ClassNotFoundException</code>. Please help.</p> <p>I also tried keeping al...
3
2,016
FluentNhibernate - boolean flag based on count from another table
<p>I have seen a few questions like this on SO, but I still cannot get this to work in my code, despite my code looking like the accepted answers.</p> <p>First, my mapping (condensed)</p> <pre><code>public SiteMap() { Table("SiteDetail"); Id(x =&gt; x.SiteId, "Id").GeneratedBy.Identity(); } </code></pre> <p...
3
1,121
why seq2seq model return negative loss if I used a pre-trained embedding model
<p>I am following this example code to build a seq2seq model using keras. <a href="https://github.com/keras-team/keras/blob/master/examples/lstm_seq2seq.py" rel="nofollow noreferrer">https://github.com/keras-team/keras/blob/master/examples/lstm_seq2seq.py</a></p> <p>when I train that code it works normally fine and the...
3
1,713
Fetching Standard Meteorological Week from pandas dataframe date column
<p>I have a pandas dataframe which is having long term data,</p> <pre><code> point_id issue_date latitude longitude rainfall 0 1.0 2020-01-01 6.5 66.50 NaN 1 2.0 2020-01-02 6.5 66.75 NaN ... ... ... ... ... ... ... ... ...
3
1,361
display all data with only a single object from array of objects
<p>I am new to java and react. I get this data from backend.</p> <pre><code> { &quot;id&quot;: 1, &quot;uName&quot;: &quot;Example GmbH&quot;, &quot;uAdresse&quot;: { &quot;id&quot;: 2, &quot;str&quot;: &quot;Dieselstr&quot;, &quot;strNum&quot;: &quot;160&quot;, &quot;plz&q...
3
1,449
How to match private polymorphic variant type outside of containing module?
<p>I can close the ability to create an instance of variant type outside the containing module with a <code>private</code> keyword.</p> <pre class="lang-ml prettyprint-override"><code>module Ordinary : sig type t = private X | Y val x : t end = struct type t = X | Y let x = X end </code></pre> <p>I can't crea...
3
1,027
How can I Call a function within a function using action script 3.0
<p><strong>How can i call function in another function using action script 3.0 Here I am Using WSDL Web service and getting data in my data grid. i want to put this data into my database table.</strong> </p> <p>I am calling Following function on Button click event which is associated to WebService .</p> <pre><code>pr...
3
2,293
Mixing listview and pageview in Android to make a swipe-able settings menu
<p>Hey so I am trying to create a settings menu that is swipped to from the main screen. I used Pager Adapter to create a three page view that a user can swipe to from a center screen.</p> <p>I.e:</p> <pre><code> POST SCREEN ------SWIPE------- HOME ------SWIPE---------- SETTINGS SCREEN </code></pre> <p>I no...
3
1,659
ERR_STREAM_WRITE_AFTER_END while using request promise Node Js
<p>I have request promise that use to call another API with few loads here's my request promise</p> <p>here's my container</p> <pre><code> if (!req.uploadedFile2) { opt2 = { method: 'POST', body: { token: req.body.token, name: req.body.name, ...
3
1,561
Iterate on XML with lots of sales
<p>I have a XML file with lots of sales, and in the sales I have multiple items to. The problem is: I can't find the solution to iterate on products</p> <p>The sales are separeted under the tag "CFe". I'm iterating on this tag, and when I reach items tag, I try to iterate once again, but only iterate on a single item....
3
11,276
Where is this tiny bit of space/gap coming from?
<p>I'm essentially creating a "sliding-door" animation with the words "HELLO" in the middle, that will split in half as the doors open. The text on the left has letters pushed right up to the edge of the left "door"/div, while the text on the right has a tiny little gap on the left (the "LO!"). I checked with the dev c...
3
1,428
Combining rows without a unique identifier
<p>I could use some help on developing a way to combine rows of data when the rows don't contain unique identifiers that the other rows reference. There is a pri_key, but the trailing rows never reference that key. </p> <p><strong>Disclaimer:</strong> I have no control over the design of the table. This is a query I'm...
3
1,692
React Native - Trying to create a drawer with tabs navigators in react navigation without the Drawer Item of the Tabs being rendered
<p>I am trying to create an app where I have a drawer and tabs navigators on each page. I followed various tutorials and the react navigation docs but could not find a solution.</p> <p>I have created a drawer navigator and within the &lt;drawer.screen/&gt; component I put my main tab navigator (My Tab navigator has mul...
3
1,587
React-Table + Axios rendering error - data.forEach is not a function
<p>I see this is a fairly common question, sorry to ask it again but none of the answers to similar questions work for me. Using the very popular Axios / React-Tutorial, I'm able to pull and render info with this call -</p> <pre><code> useEffect(() =&gt; { (async () =&gt; { const result = await axios(&quot;h...
3
2,006
Max retry attempts and back off interval not changing
<p>I am trying to retry consumer on exception in my code. my consumer looks like below</p> <pre><code> @Bean public Consumer&lt;Message&lt;String&gt;&gt; input(){ return -&gt; { String output = service.getValues(); }; } </code></pre> <p>below are the ways i have tried out.</p> <p>1.<...
3
1,858
React component calling submit function whenever component changes
<p>I have a react-strap modal that's used for booking meetings that get stored in an sql database. Heres the modal component:</p> <pre><code>import React from 'react'; import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Col, Form, FormGroup, Label, Input, Container,Alert } from 'reactstrap'; import Request fr...
3
1,495
Passing a DOM element from background.js to content_script.js
<p>(I will refer to background.js as <strong>ba.js</strong> and content_script.js as <strong>cs.js</strong>)</p> <p><strong>Scenario:</strong> </p> <ol> <li><strong>cs.js</strong> is being injected in every webpage.</li> <li>User might click a context menu button to display a modal on the main webpage.</li> <li>So, t...
3
1,152
Image slider positioning
<p>I am looking for some advice/support on an image slider which I have created. Its made of two parts, the images that slide on the left and the captions and navigation to the right. the Issue I am facing is that I cannot get the captions out of the container of the slide itself I am wondering if there is a way to esc...
3
1,094
How to solve the stock spans problem using a stack?
<p>I am looking at <a href="https://practice.geeksforgeeks.org/problems/stock-span-problem-1587115621/1" rel="nofollow noreferrer">this stock span problem</a>:</p> <blockquote> <p>The stock span problem is a financial problem where we have a series of <strong>n</strong> daily price quotes for a stock and we need to cal...
3
1,423
jQuery UI Datepicker going out of scale
<p>My Datepicker is changing shape and stretching across to the very end of the screen. What could be wrong? Here is my code:</p> <p>Also, how can I alter the date in the jQuery so it appears as dd-mm-yyyy?</p> <p><a href="https://i.stack.imgur.com/IQzVV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur....
3
1,447
Configure interdependent security groups in AWS VPC
<p>In the AWS VPC, I added a security group for the database access that allows any request from a specific CIDR IP on port 3306. This CIDR IP includes private subnets as well as public subnets. A public subnet is allowed so that database can explicitly be connected to developers machines using bastion host (EC2 instan...
3
1,139
Integration tests failing in Grails & App Engine
<p>I am using <strong>Grails</strong> with the <strong>App Engine plugin</strong> and <strong>JPA persistence</strong>. When running </p> <blockquote> <p>grails test-app</p> </blockquote> <p>my unit tests run perfectly, but I receive the error below when the integration tests start. </p> <p>Is this a known issue ...
3
1,433
Lag when using Midnight.js on a full-height element
<p>I have a fixed position element which I am using Midnight.js (<a href="https://aerolab.github.io/midnight.js/" rel="nofollow noreferrer">https://aerolab.github.io/midnight.js/</a>) to change the colour of depending on the elements which scroll behind it.</p> <p>The idea is that the contrast is always high enough for...
3
1,985
How to preprocess a dataset for BERT model implemented in Tensorflow 2.x?
<h2>Overview</h2> <p>I have a dataset made for classification problem. There are two columns one is <code>sentences</code> and the other is <code>labels</code> (total: 10 labels). I'm trying to convert this dataset to implement it in a BERT model made for classification and that is implemented in Tensorflow 2.x. Howeve...
3
1,902
Android>>AndEngine: What does an error of this LogCAT form mean?
<p>I suspect a threading or issue with various arraylist access. Well, I no longer get 'easy' concurrency exceptions, only the same error message in the following form. </p> <p>I've read somewhere that this may be due to Dalvik VM itself crashing.</p> <p>I also note /libandenginephysicsbox2dextension.so appearing. </...
3
3,170
running a csv input API and connecting to a zoomable sunburst API
<p>I hope you are having a nice day.</p> <p>I am trying to use this CSV input API -- <a href="https://github.com/MounirMesselmeni/html-fileapi" rel="nofollow noreferrer">https://github.com/MounirMesselmeni/html-fileapi</a> -- to populate the data array in this zoomable sunburst API:https://plotly.com/javascript/plotlyj...
3
1,747
How to open parent activity with last visited content page from another activity in xamarin.forms?
<p>I am working in <code>xamarin.forms</code>. I am stuck in activity navigation in Android. </p> <p>My whole application is working under one <code>Activity</code> that is <code>MainActivity</code>. From one of my content page, I want to open Contact application with all list of contacts.</p> <p>I have created one a...
3
2,674
Android : Replacing a fragment inside an Activity's onPause() method gives NullPointerException
<p>I am trying to learn fragments in android and trying to replace fragment with another one in the Activity's <code>onPause()</code> method when the activity pauses.</p> <p>My code for onPause method is :-</p> <pre><code>public void onPause(){ super.onPause(); System.out.println("ActivityA-onPause()-1"); ...
3
1,436
Vue-multiselect update field using AJAX
<p>Here is my Vue multiselect component:</p> <pre><code> &lt;multiselect v-model=&quot;selectedcategoryitem&quot; :options=&quot;options&quot; :multiple=&quot;true&quot; :internal-search=&quot;false&quot; ...
3
3,282
Winform Scrollbar don't show up on script initialized Datagridview
<p>I have a problem with my script initialized DataGridView. I tried a lot of solution prior to post this question and made a lot of research.</p> <p>Here is the problem, when I use the method above, I can't see the scrollbar.</p> <pre><code> public void AddNewPanTab(TabControl tab, ComboBox panIndex) { ...
3
1,359
ZOIB package syntax, one response variable and one fixed variable - r
<p>I believe I am having a syntax issue within the zoib r package. I am trying to model how a one-inflated proportional response variable (proportion eggs fertilized) changes with lineage male values (also proportional). I do not have any other fixed or random effects. I have tried many different syntax styles, but get...
3
1,203
Animate labels for 20 seconds
<p>I have 3 labels binded like following</p> <pre><code>&lt;StackLayout&gt; &lt;Label Padding=&quot;1&quot; Text=&quot;VRN&quot; FontSize=&quot;25&quot; TextColor=&quot;Black&quot; VerticalOptions=&quot;Center&quot; HorizontalTextAlignment=&quot;Center&quot;/&gt; &lt;Label Padding=&q...
3
2,265
Option input in form not passing
<p>I am trying to use a form to fill my db. I use a table from the database to fill the options in the form and it works, but the value is not being passed through, I ran through my code and can't find a typo, is there an error I am not seeing?</p> <pre><code>&lt;?php require("db.php"); ?&gt; &lt;html&gt; &lt;head&...
3
2,011
How to dynamically print list in Python
<p>We're working on a Python project, where we are retrieving data from our MySQL database, and we're then sending it back to a new table on our database. We have initialized a list, </p> <p><code>list_lpn_temp = []</code></p> <p>The problem is that the range of this list varies, and therefore we don't always know ho...
3
1,730
Spring Redirect on Post Method Even Though no POST Method is Implemented
<p>I am new at Spring,</p> <p>I have created new Spring MVC project with the following controller:</p> <p>@Controller public class AccountController {</p> <pre><code>@RequestMapping(value = "/register", method = RequestMethod.GET) public String initForm(Model model){ WebUser webUser = new WebUser(); model...
3
2,607
Builds from Android Studio Windows start slower on device than builds from Android Studio Mac OS
<p>I have an android project and up until a few weeks ago I worked on a macbook on it. The builds were starting instantly after Android Studio installed them on the device.</p> <p>After I've moved to a new windows laptop running the same version of Android Studio and JDK 8 I've noticed the builds start a lot slower. B...
3
2,521
How do I fix a HTTP Error 400: Bad Request in python3?
<p>I am trying to access checkpoint firewall by using it's API but for some reason I am getting HTTP Error 400: Bad Request, I have never had this before. Any ideas? Here is my code:</p> <pre><code>import json import ssl import urllib.request, urllib.parse, urllib.error import urllib.request, urllib.error, urllib.parse...
3
1,068
Cannot write dataframe into hive table after using UDF in Pyspark
<p>I am trying to extract first element of probability column (vector data type) using UDF in Pyspark. I was able to get the new dataframe with extracted values in probability column. I also checked the data type of probability column which has changed from vector to float. But I am not able to write the dataframe into...
3
1,421
Qt: how to make QGraphicsPixmapItem automatically move in a repeating route
<p>I am making a game now, and I want my QGraphicsPixmapItem automatically move from left to right and right to left between my view repeatedly in the same route. </p> <p>To be more specific:</p> <blockquote> <p>my enemy start at (0,0), and it start off by heading right (x()+3). When it hits the far right(800,0), i...
3
1,479
Use for loop and local array with each item in *ngFor
<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>//this.http.get("https://example.com/_api/web/lists/getbytitle('ImagingDocumentTypes')/items?$select=Title,Image,Source/Title,System...
3
1,089
GoDaddy Windows Plex PHP error_log not working right
<p>I'm having an issue where I get an "Internal Server Error" on my php page. To try and debug it, I attempted to use the error_log function in php. However I could not get it to write anything to the error log. Even in a simple php file:</p> <p><strong>httpdocs/temp.php</strong></p> <pre><code>&lt;?php error_log("th...
3
1,062
When selecting row 0 in JTable the selection handler goes mad
<p>I'm having problems with the selection handler for a JTable. </p> <p>The table is updated every 15th second from a refresh thread in the Control.</p> <p>I want to select a row in my JTable and extract a column contents that I will use to build a filename from.</p> <p>As long as row 0 is not selected during a refr...
3
6,397
Why do properties of a SPECIFIC div element spread to other separate div elements?
<p>I made a small practice website. I came up with a problem that is kind of frustrating.</p> <p>I made a div as follows:</p> <pre><code>&lt;div class="work-process"&gt; &lt;div class="container" align="center"&gt; &lt;div class="col-md-12"&gt; &lt;p class="takeaway"&gt; Learn a...
3
6,277
Organizing JSON Data Alphabetically
<p>I have been troubleshooting trying to get data from a JSON document to be entered/inputted into a HTML document in alphabetical order. I found similar requests on stack overflow; however, when implementing a solution into the current code, the JSON Data is not reorganized as desired.</p> <p>The current code:</p> <...
3
1,060
Problem in adding a new node at the front of the linked list
<p>I'm trying to add a new node to the beginning of the linked list .So the newly added node becomes the new head of the Linked List and the previous head of the linked list becomes the second node. Here is my code:</p> <pre><code> #include &lt;iostream&gt; #include &lt;iomanip&gt; class Node { ...
3
1,053
How to create a variable (that captures increases at a certain threshold) R?
<p>I have a dataset that looks something like this</p> <pre><code> Subject Year X Y A 1990 1 0 A 1991 1 0 A 1992 2 0 A 1993 3 1 A 1994 4 0 A 1995 4 0 B 1990 0 0 B 1991 1...
3
1,893
Baking a Scala Cake with shared types
<p>I'm trying to build a very general solver system. My goal is to make it easy to mixin different problem spaces (graph coloring, knapsack packing, etc.) with various abstract solvers (branch-and-bound, local search), and various concrete strategies (like the specific "goodness" function). I can sort of make it work w...
3
1,334
All messages in queue get allocated to a single subscriber
<p>I have sent some 10000 messages to a persistent RabbitMQ queue, all these messages are in &quot;Ready&quot; state. The code below sleeps for 10 seconds when processing each message. As soon as I run the rust application that calls the function below, all these messages in the queue have their status moved from &quot...
3
6,441
I want to update my state using an imported functions as my datastore
<p>I want to update my state but using a functions in a js file as my data store : this is my function:</p> <pre><code> updatedItem(id, property) { this.list = this.list.map( (element) =&gt; element.id === id &amp;&amp; { ...element, ...property } ); } fetchItems() { return this.list; ...
3
1,619
Webview not loaging url
<p>I am simply tring to load url in my web view but its not getting load ,it simply showing me white screen but the same url works well when i hit it on web. here is my code to load url in webview :-</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-html ...
3
1,223
Use Picasso inside Asynctask inside Fragment java.lang.IllegalStateException
<p>Good day guys, I have a problem using picasso to fetch image from my server to set as image of my ImageView, that Picasso was inside the class that extends Asynctask and that class was called from my class that extends Fragment, I think I had a same Problem about this guy <a href="https://stackoverflow.com/questions...
3
4,354
Importing file is stopping the ability to insert data into database
<p>In my application, a user can ask a question and then anyone can see that question and post a response. I have the the questions shown in a table view and then you can push to a detail view to see the specific question and post a response. From the detail view, you can enter another view to see all the other answers...
3
1,486
How I have to adjust the json path so that my test is successful?
<pre class="lang-java prettyprint-override"><code>@DisplayName(&quot;test getCarportById(), Status OK&quot;) @Test void testGetCarportLocationById() throws Exception { // given final String externalId = &quot;123L&quot;; final CarportLocation carportLocation = CarportLocationMockHelper.createCarportLocati...
3
1,537
Android Studio Nesting ScrollView in a Constraint Layout
<p>I am new to android studio and have been messing around with this layout for the last hour or two. I want the whole screen to be able to scroll.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" ...
3
3,670
numpy - could not broadcast input unknown error
<p>I am attempting to run the following code, but am getting the following error:<br /> <code>line 71, in cross_validation folds[index] = numpy.vstack((folds[index], dataset[jindex])). ValueError: could not broadcast input array from shape (2,8) into shape (8)</code> <br/> What is interesting is that when I print o...
3
6,632
MediaRecorder: Record from Microphones and Play audio from Element (music playback)
<p>I like to record my voice with some mp3 music that I choose from the video tag, When I change the src audio element, the new music doesn't record, MediaRecorder just records the first music, so I like to record all music coming from the video tag src. let constraintObj = { audio: 1, video: 0}</p> <pre><code>navigato...
3
1,199
How to put 4 sets of two charts side by side on HTML?
<p>I'm a newbie in HTML. I'm currently trying to put 4 sets of two graphs side by side on a webpage. So each set would have a graph above and below. My code is as the following:</p> <pre><code>&lt;template&gt; &lt;div class = &quot;container&quot;&gt; &lt;div class=&quot;col-xl-3 col-lg-12&quot;&gt; &lt;div class...
3
4,362
Need help in my query scenario
<p>I need help in writing a query for the below data (SecondaryTable),</p> <pre><code>-------------------------------------------------------------------------------- PrimaryID1 PrimaryID2 TableID FlagField ServiceID FieldData ------------------------------------------------------------------------...
3
1,099
Order by in Unnest
<p>Explain my Problem with Sample Query</p> <pre><code>select p1.zonename,p1.beatname,p1.groupname,p2.partyname,p2.amount, p2.groupofcompany from party1 p1 inner join party2 p2 on p1.txno=p2.txno </code></pre> <p>This Query show result like this</p> <pre><code>ZoneName BeatName GroupName PartyName Amount Groupofco...
3
1,265
Replace item in NSMutablearray
<p>I have an NSMutablearray that I have data saved to. Data is input on my main ViewController. When you tap on a saved item, the SecondViewController has a textfield that the data entry is loaded into in order to be edited. I want to be able to edit that item and then save it back to the array.</p> <p>I am fairly new...
3
1,317
OSX AES Encryption is not working
<p>In my application, i need to encrypt the file before sending it over the network and on the other end, it will get decrypt, This is my code, </p> <pre><code>-(void)doEncryptTest:(NSString *)pFileName{ // read the NSData; NSStringEncoding encoding =NSUTF8StringEncoding; NSString *pFileContent = @"xaa...
3
2,112
Error parsing message with type 'tensorflow.SavedModel'
<p>This is the error message i get-</p> <pre><code>Traceback: File &quot;/app/.heroku/python/lib/python3.9/site-packages/streamlit/script_runner.py&quot;, line 354, in _run_script exec(code, module.__dict__) File &quot;/app/app.py&quot;, line 131, in &lt;module&gt; label, perc = classifier(image, model_file) Fi...
3
1,306
Parallax mapping and shadow map
<p>I'm currently working on a new OpenGL Engine. I had a version running with normal mapping and shadow map shadding. I recently added parallax mapping to enhance the visual effect of plane texture. My problem is that I don't understand how to include the shadow mapping with the parallax effect. At the moment the shado...
3
1,569
Cannot display two scrollview together in stacklayout in Xamarin Forms
<p>I try to add two horizontal scrollviews together in one stacklayout. But displayed only last scrollview(<code>scrollView1</code>). Why first <code>scrollView</code> doesn't display?</p> <pre><code>var avatarLayout = new StackLayout() { HeightRequest = 500, }; StackLayout st =...
3
1,097
clustering opendaylight-boron
<p>I am new to Opendaylight (Boron) clustering using Mininet. I followed the instructions provided through "<a href="http://docs.opendaylight.org/en/stable-boron/getting-started-guide/common-features/clustering.html" rel="nofollow noreferrer">http://docs.opendaylight.org/en/stable-boron/getting-started-guide/common-fea...
3
1,734
Using bc as daemon in BASH shell from awk
<pre><code># mkfifo inp out # bc -ql &lt;inp &gt;out &amp; [1] 6766 # # exec 3&gt;inp 4&lt;out # echo "scale=3; 4/5;" &gt;&amp;3 # read a &lt;&amp;4; echo $a .800 # # awk ' BEGIN { printf("4/5\n") &gt;"/dev/fd/3"; exit 1;} ' # read a &lt;&amp;4; echo $a .800 # # awk ' BEGIN { printf("4/5\n") &gt;"/dev/fd/3"; exit 1...
3
1,119
Javascript: Image does not get updated immediately
<p>I'm trying to learn Javascript from the book Head First Javascript (Morrison).</p> <p>Inside the function findSeat(), the code is supposed to update the image to 'seat_select.png' for every seat that is available and then ask for a confirmation.</p> <p>However, when I run the code, the images are updated immediate...
3
1,820