title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
ListView not being displayed within fragment?
<p>I have a fragment in which I call a function that is supposed to populate and display a listview defined in the fragment's xml, but for some reason none of the text is appearing in the listview. All of my logs are outputting correctly in the console, so I know that the optionlist is getting populated correctly. Here...
3
1,051
Networkx: how to combine edges together with condition?
<p>I'm working with Open Street Data that I've enriched and am modeling through NetworkX. However, there is a very large number of nodes that just exist to design the edges' curves, as they've only got two edges.</p> <p>Therefore, I'd need to simplify the grah by aggregating edges connecting such nodes to each other, w...
3
3,029
Add Account To Account Manager After Firebase Auth UI
<p>I am trying to take WhatsApp's approach to contact lists, where I simply sync my app's contacts with the devices contacts. I am using Firebase as my Authentication Platform and Database (Firestore). I am using Firebase Auth UI for Phone Number Authentication.</p> <p>What I would like to achieve is my In-App contact...
3
1,454
Cannot Migrate with taps ERROR: Rack::Utils::OkJson::Error
<p>I'm trying to migrate my rails database from sqlite3 to postgresql so I can push to heroku. I'm trying to migrate the data as well.<br/> Here is my gemfile:</p> <pre><code>source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.5' # Use sqlite3 as the databa...
3
1,731
I need help to analyze this programming technique to compress an array
<p>I hope readers are aware of shannon's information theory which says that information content associated with an event a with probability p(a) is -log(p(a)). In layman terms if you need to represent a number in the range of 0-7 then you require at least -log(1/8)=log(8) (where base is 2) ie 3 bits.</p> <p>Suppose th...
3
1,686
In flutter using android studio I can't run an app in a real device
<p>I finish an app with go back end, and everything is fine when I run the app with a device emulator, but when I tried with a physical device I can't do it</p> <p>this is my code</p> <pre><code>class AppConstants{ static const String BASE_URL=&quot;http://192.168.0.4:8080&quot;; // this is my IPv4 Address static c...
3
1,234
Node not talking with Postgres Database after using Docker
<p>Im very new to Docker. I'm trying to dockerize a very simple to do app build with react, node/express and postgret. I've been reading a bunch of articles and looking at solutions here in stackoverflow and still cannot figure out why my app is not working. When I run docker-compose up -d, it builds a cluster with thr...
3
1,226
java,Arraylist,morse code
<p>I have task to code a morse code converter in java. I input words and it converts them to morse code.</p> <p>I should not use <code>HashMap</code> or <code>HashSet</code>. I can use <code>ArrayList</code>. I wrote it but I have error. Can you help me, pls </p> <p><strong>The Error:</strong></p> <pre><code>Excepti...
3
1,263
glBufferSubData has peaks with small buffer sizes
<p>I am making a simple 2D game engine with OpenGL, and my <code>SpriteRenderer</code> class makes batches of sprites which use the same shader or texture. Once I sort them first by texture, then by shader, and then by depth, the <code>uploadData()</code> method of my <code>SpriteRenderer</code> class uploads the CPU g...
3
1,236
Editing MySQL row via POST form
<p>I've encountered a problem which i'll try to describe below...</p> <p>Let's say i've got a button for each table row (table is created by acquiring the data from the database...). the button sends a massive of values via post.</p> <pre><code>&lt;button value='$e-&gt;eventId|$e-&gt;eventType|$e-&gt;eventDate|$e-&gt...
3
10,027
blank space between navbar and iframe
<p>could someone please help ive come across the below css and html which works great. yet the only problem I have is the blank bar between the navbar and iframe. ive look around google to see what is causing it without success. (may also have something to do with not having a clue what im doing)</p> <p>here is the s...
3
4,069
Login is working properly but friend list is not shown and application crash due to null pointer exception
<p>I'm new to facebook integaration, please help me with following issue:</p> <p>null pointer exception at on click of the button of the alert box named as facebook </p> <pre><code> private void onClickPickFriends() { final FriendPickerFragment fragment = new FriendPickerFragment(); setFriendPi...
3
1,260
Scrapy login works for certain website but does not work for other websites
<p>I can use below code to login to Github. But when I try the same code to other websites, it still remains at the login page, it does not login. Did I miss anything? </p> <ul> <li>Github</li> </ul> <pre><code>class GithubSpider(scrapy.Spider): name = 'test' start_urls = ['https://github.com/login'] d...
3
1,099
Selecting Image from image gallery works on emulator but not the android devices
<p>I am trying to select image from the image gallery of android phone and it runs as expected in the emulator but when I install it in my galaxy s4 and runit, it doesn't work. I have installed the cordova camera plugin and running cordova 3.5.0.2.4 The code snippet is as below </p> <p>upload.html </p> <pre><code> ...
3
1,106
Spring 4.1 configuration for static content
<p>I am trying to modify Mkyong's Spring 3 MVC and JSON example (<a href="http://www.mkyong.com/spring-mvc/spring-3-mvc-and-json-example/" rel="nofollow">http://www.mkyong.com/spring-mvc/spring-3-mvc-and-json-example/</a>) to work with Spring 4.1.x and allow reaching html files under webapp directory. For 4.0.x <code>&...
3
2,600
How to optimize the SQL query to reduce the runtime?
<p>Below is a sample of the table structure I am using. The table almost contains 200 million records.</p> <p>The <code>query_1</code> returns the distinct combination of col_1, col_2 and col_3. Then it is iterated over these combinations to perform another query.</p> <p>Given that the table is huge, the run time for t...
3
1,028
How to upload an Image to server in from android app to Laravel?
<p>I am trying to upload an image using Retrofit to Laravel server from Android application. I have used Multipart to upload an image but it shows me <strong>File is empty</strong>.</p> <p><strong>Interface to call the api</strong></p> <pre><code>@Multipart @POST(&quot;jobseeker/update/image&quot;) Call&lt;ProfileImage...
3
1,958
Issue with recyler view
<p>My recycler view gets inside the tab layout</p> <p><a href="https://i.stack.imgur.com/jwKIL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jwKIL.png" alt="enter image description here"></a></p> <p>I have issue with Recylerview.What should I do to overcome this problem. I am new android develope...
3
2,331
SwingWorker.process() not getting called in a command line application
<p>I have observed a strange behaviour of a command line application that invokes SwingWorkers. The code is non-optimal in the sense that it creates a lot of thread pools. However, due to the control of the <code>generation</code> variable, all these pools except the last one do not execute any code. It implies that th...
3
1,184
Android Maps not initializing on 2g or slow internet connections
<p>In one of my activity I am showing google map in fragment. It's working fine with 3g or high speed internet connection. But in 2g or very slow internet connection it's hang my mobile, And after some time I get 'not responding' message. Is there any way by which i can handle this situation? here's the code</p> <pre>...
3
1,402
Compile PJSIP example
<p>I am trying to compile a PJSIP example following <a href="https://trac.pjsip.org/repos/wiki/Getting_Started_Using" rel="nofollow noreferrer">this tutorial</a>, but I have those errors after <code>make</code>:</p> <pre><code>cc simple_pjsua.c -o simple_pjsua /tmp/ccxmvFQD.o: In function `on_incoming_call': sim...
3
1,393
Trouble having program terminate
<p>I am doing a program for class. Basically the program walks through some sales information for the day and prints a report at the end. </p> <p>My only issue is that the program does not seem to exit at the end. When i type "done" for the employee name it prints the report but the program loops back and continues...
3
1,804
java.lang.OutOfMemoryError: [memory exhausted] in android
<p>I am making this android app which requires solving puzzle8 using A star algorithm. In order to implement this, I used a comparator as shown below:</p> <pre><code>public class PuzzleBoardComparator implements Comparator&lt;PuzzleBoard&gt; { @Override public int compare(PuzzleBoard A, PuzzleBoard B) { Integer pr...
3
2,335
not able install node modules using npm install command. getting the below error
<pre><code>npm ERR! code 1 npm ERR! path C:\Users\gente\Desktop\dvaraAIT\node_modules\grpc npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --library=static_library npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\gente\AppData\R...
3
3,036
How to toggle React component using redux toolkit
<p>I am trying to toggle (show/hide) react component with redux toolkit but i can not get the value of &quot;toggle&quot;,redux toolkit useSelector is not working. it showing &quot;undefined&quot;.</p> <p><strong>this code is not working.please put your suggestion about my mistakes.i need your help..please help me.</st...
3
1,666
ActionListener in Java doesn't work for me
<p>I was watching a tutorial on how to crate a login system in Java and when I recreated it, it just wouldn't work. When I start the program I can see all my JLabels, JButtons, and my JPasswordField but when I press the reset button I get hit with this error message in the console</p> <pre><code>in thread &quot;AWT-Eve...
3
2,415
How to make a key generated, 7 segment display, output persist after the key is released? [VHDL]
<p>I'm trying to read input from the keypad and I want the number entered by the user to persist on a 7 segment display until another key is pressed. </p> <p>Currently, the 7 segment display output disappears when the key is released. How can I make the 7 segment display output persist? </p> <p>This is my entire cod...
3
1,063
Retrieving values from a hash map in my JSP
<p>Some background information of what I'm trying to achieve is a user hits the submit button on my JSP page it needs to send the message submitted to a text file and then I need to access the file and retrieve all the messages in the file in my JSP page. Please help me out, I have spent too long and I'm not sure what...
3
1,557
Converting a Large list of lists with 'data points listed in lists' into a data frame in r
<p>I have exhaustively researched on how to convert a complex list to a data frame - but it seems my case is fairly unique:</p> <p>Problem: I have a Large list with lists of several variables, whose observations (data points) are further listed as a list.</p> <p>Below is the structure of a representative list 1 of th...
3
2,543
Resource not found android in BlankActivity layout
<p>I created a BlankActivity and compiler doesn't recognize class FloatingActionButton, telling me that the class could not be instantatied. I think that the problem is SDK.</p> <p> </p> <pre><code>&lt;android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_c...
3
3,319
Runtime error: reference binding to null pointer of type 'int' (stl_vector.h) while dealing with leetcode test cases
<blockquote> <p>SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h:1043:9</p> </blockquote> <p>was the remainder of the error message.</p> <p>I have been working to solve the Merge 2 sorted arrays problem (<a href="https://leetcode....
3
1,113
JavaScript Functions: Grade Distributions
<p>I was wondering if someone could help me understand what I am doing wrong? Below I have posted the assignment question, my code, and then the result I am getting.</p> <p><a href="https://i.stack.imgur.com/d9y14.png" rel="nofollow noreferrer">Assignment</a></p> <p>Here is my code:</p> <p>function parseScores(scoresSt...
3
1,551
How to print something to the console from OpenMP source Code?
<p>I am modifying OpenMP source Code, and I want to make sure that it is indeed working. For example the following code:</p> <pre><code>#include "omp.h" int main() { int i=0; #pragma omp parallel for schedule(dynamic,4) for(i=0;i&lt;1000;++i) { int x = 4+i; } } </code></pre> <p>Should cal...
3
1,058
Updating Android Studio to version 2.2 and project not run
<p>My project run normally in Android Studio version 2.1.2.In my project used Google map when I update AS to version 2.2 project not run (I do not use fire base but in log this error shown) this is error log:</p> <pre><code> java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions ...
3
1,900
Select distinct one column oracle
<p>this is my query</p> <pre><code>SELECT PHMR_ID, NVOL_MVT_COD, TO_CHAR(DATE_PREVUE, 'DD/MM/YYYY') AS DATE_PREVUE, TO_CHAR(DATE_ORIGINE_LT, 'DD/MM/YYYY') AS DATE_ORIGINE_LT, HTAD, DHC_AFF, PKG, PKG_GEO, GATE, TTB, BQE, SALLE, ESCALE, TA_CLE, IM_IMMAT, VOL_NB_PAX_GLOB, VOL_CRIT_DOUA...
3
5,632
Spring @Component HttpGet execute
<p>I have a Spring MVC application. The problem is that I can't execute HttpGet and receive response inside @Component class. Here is what my @Component class function looks like:</p> <pre><code>private String getSite(String url) throws IOException, InterruptedException { HttpClient httpclient = HttpClients.create...
3
1,736
TSQL - Select Top 10 & display the rest as 'Other'
<p>I have a table of browser "Name"s &amp; "Version"s</p> <pre><code>Name Version Safari 5.1 Safari 4.0 IE 5.0 IEMob 9.0 </code></pre> <p>I'm writing a query to return the Top 10 most common browsers allowed and marking any additional browsers as 'Other'</p> <p>Here is my stored procedure so far at the m...
3
1,084
How to remove usage of excess keyframes by using animation-delay?
<p>I'm looking through Google Polymer's source code and I found this:</p> <pre><code>/** * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee): * * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't * guarantee that the animation will start _exactly_ after that value. So we ...
3
1,208
Android align button depending on visibility
<p>I have a little issue with setting align of a button in my application. I have 4 different buttons in one layout and depending on some values from database I have to set the visibility of one button. Here is the example of xml code which I'm using :</p> <pre><code> &lt;RelativeLayout android:id="@+id/coll_butt...
3
1,331
Japanese text in unicode
<p>I'm having a problem converting Japanese text into readable text. Right now I have a trial program that is getting values from the user. These value are then passed through a class that I've called word to create an object. Once the object has been created, I'm wanting to write and read the object to a file. Since I...
3
1,258
Merging images in JPanel
<p>I was trying to build a tinder clone project by using Java Swing. What I am trying to do is that when I clicked on people's images in the JPanel where I'd added people who were matched with the logged user, I wanna display an <strong>X</strong> icon which is gonna delete the user from my database and JTable when it'...
3
1,294
Fails to start react native app on Android emulator (Task :app:checkDebugAarMetadata FAILED)
<p>To start with I've followed <a href="https://medium.com/@davidjasonharding/developing-a-react-native-app-on-an-m1-mac-without-rosetta-29fcc7314d70" rel="nofollow noreferrer">this article</a> to setup React Native without Rosetta on MacBook Pro with Apple M1 chip. It works fine with iOS simulator but android emulator...
3
5,172
AWS Textract - Analyzing PDF file with Lambda
<p>I'm having a hard time trying to use Textract in Lambda to analyze PDF document with javascript. I would really appreciate some help here.</p> <p>Here is my code:</p> <pre class="lang-js prettyprint-override"><code>const AWS = require(&quot;aws-sdk&quot;); AWS.config.update({ region: process.env.AWS_REGION }); cons...
3
2,621
How can I get microsoft graph findMeetingTimes working properly?
<p>I've been using Microsoft Graph API methods to retrieve Meeting Suggestion Times but the following error's returned rather than the right object:<br /> <code>&quot;Code: BadArgument\r\nMessage: Invalid user address\r\nInner error:\r\n\tCode: UnsupportedScenario\r\nAdditionalData:\r\n\tdate: 2021-07-01T15:44:10\r\n\t...
3
1,160
In batch, how would i go about undoing something?
<p>Im playing around with batch, and im trying to make a little fun thingy. i have a couple problems:</p> <p>when in either :backcol or :textcol when i change the color of the text or background do a different color, and then answer n/N to :keepbc or :keeptc, how can i make the color return to what it was before i cha...
3
1,389
WCF Throws FaultException, client catches Exception but loses all information
<p>I am making an Async call from a client to a WCF Service. The service is throwing a FaultException exception. When I catch the exception in my Client "Completed" event handler, it catches the exception, but loses all information about it. All I get is a generic type Exception with this error message: "Communicati...
3
1,150
Odoo Error when installing Addon : View Inheritance Error
<p>At the moment I am working on an addon for the timesheet_grid module for odoo13. I came across this problem, cant find any solution. I think it says the view name is already taken, is this right ?</p> <p>My code</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;odoo&gt; &lt;re...
3
2,131
Three option for displaying dynamical javascript with css
<p>Goal:<br /> Value 1 show css &gt; badge-primary<br /> Value 2 show css &gt; badge-secondary<br /> The rest of the value show css &gt; badge-danger</p> <p>It take place at function handleChange.</p> <p>Problem:<br /> I was only enable to use false or true in order to use css. It is only two option.<br /> The third op...
3
2,267
How to modify the values in a group based on the presance of some other value in the group using dplyr?
<p>This is my data</p> <pre><code>structure(list(group = c(&quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;C&quot;, &quot;C&quot;, &quot;C&quot;, &quot;D&quot;, &quot;D&quot;, &quot;D&quot;), type = c(&quot;T1&quot;, &quot;T2&quot;, &quot;T3&quot;, &quot;T1&quot;, &quot;...
3
1,032
display result of json data in textview of android
<p>I am having one problem while displaying data in android app.This is my php.I have edited now to shorten the code. <pre><code>if($imei_no!="" &amp;&amp; $app_auid!="") { //chk query $chk_query=$db1-&gt;query("select * from user where imei_number='$imei_no'"); $chk_cnt=$chk_query-&gt;row...
3
2,279
JS / d3.js: Creating groups for source/target links
<p>I have been trying to colour some nodes based on their links but I am not sure how to do so. Here is my current graph:</p> <p><a href="https://i.stack.imgur.com/OTmm0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OTmm0.png" alt="My current Graph"></a></p> <p>I have been trying to automatically...
3
1,572
How do I unit test a service-dependent function in Jasmine?
<p>I would like to unit test a function in an Angular controller that relies on an asynchronous API call (a promise). </p> <p>I have a function in a controller that calls a service and sets a $scope variable in the controller based on the result of the service:</p> <pre><code>$scope.display = 'loading'; $scope.loadD...
3
1,025
How can i get the day month and year from my datepicker?
<p>this is my aspx code for my calendar:</p> <pre><code>&lt;script src="jQuery/js/jquery-ui-1.10.4.custom.min.js"&gt;&lt;/script&gt; &lt;link href="jQuery/css/ui-lightness/jquery-ui-1.10.4.custom.css" rel="stylesheet" /&gt; &lt;script type="text/javascript"&gt; jQuery(function () { $.datepicker.regiona...
3
1,042
Oracle SQL Compare 4 date fields return greatest
<p>I have 4 date columns CMA_COMPLETED_DATE, APPRAISAL_COMPLETED_DATE, LNA_APPRAISAL_COMPLETED_DATE, APPRAISAL_DATE. I need to do two things with these fields.</p> <ol> <li><p>Find the one that has the greatest value.</p></li> <li><p>find the VALUE_AMOUNT that corresponding to that date. Each of the 4 fields are in di...
3
1,183
Unity 2D Jump Height different after first reloading
<p>Recently I got into Unity and I have a weird bug that my character's jump height is only higher after the first reload(respawn) on the first scene I am running.</p> <p>Scenario 1:</p> <ul> <li>Scene 1 is being loaded. Character is jumping at the correct height.</li> <li>Character dies. Scene 1 is reloaded and charac...
3
3,320
Angular 11 - Data volumetry issues
<p>My application works fine, except when the response from the service brings back a high amount of data.</p> <p>This would be the response of the service: (the problem comes when the &quot;errors&quot; array has more than 10000 elements)</p> <pre><code>{ &quot;output&quot;:[ { &quot;id&quot;:1, ...
3
1,191
Overwrite values from selected columns and matching rows from one data frame into another, R
<p>I have 2 data frames, df1 and df2. Column names are the same in both data frames and column 'field_name' is a unique identifier (each row has a unique field name). df2 doesn't have as many rows as df1.</p> <p>Some values in df2 differ from those in df1, and I want to import these values to df1 so that the original v...
3
1,528
Pytorch: TypeError: copy_(): argument 'other' (position 1) must be Tensor, not Vectors
<p>I am building my model in google colab.</p> <p>I have created a custom embedding matrix </p> <pre><code>import torchtext.vocab as vocab custom_embeddings = vocab.Vectors(name = 'custom_embeddings.txt') TEXT.build_vocab(train_data, vectors = custom_embeddings) </code></pre> <p>Here is the code for the Encoder cla...
3
1,711
NullPointerException setOnClickListner
<p>I'm beginner of android. This is the code I copy from a book. But when I download and run on my smartphone the NullPointerException occurs.</p> <p>The information of the exception as below:</p> <p>java.lang.NullPointerExcption:Attempt to invoke virtual method'void android.widget.Button.setOnClickListner on a null ...
3
1,327
How can I get the response of a POST request using Angular JS?
<p>I am using node, express, mongoose for backend and angular js for front-end. I am sending a post request using a form.</p> <pre><code>&lt;div class="alert alert-success" ng-show="success"&gt; {{success}} &lt;/div&gt; &lt;div class="alert alert-danger" ng-show="error"&gt; {{error}} &lt;/div&gt; &lt;form id=...
3
1,304
keycloak, Apache, mod_auth_openidc, elasticsearch opendistro
<p>I'm trying to setup single sign-on (SSO) for accessing private directory on apache 2.4 and assign role in elasticsearch (opendistro) for keycloak logged user. No real problem assigning role to user in keycloak (and succeed to connect to openldap server too). If I send Bearer token to ES, it links roles to backend ro...
3
2,691
MongoDB aggregation how to provide array of ids and then return documents where an array of Ids has at least one Id matching
<p>I'm using MongoDB Realm and have a function that I give an array of string IDs.</p> <p>Using the aggregation pipeline, I then want to return all documents from a collection, where their array of ObjectIds called 'categoryIds' contains at least one of those string IDs.</p> <pre><code> if (categories) { pipeline...
3
2,417
I am trying to solve the following problem using python
<p>I am trying to write a code that finds the advanced stage uncertainty of a process given some variables, however my code isn't running properly and I could use some help. This is the problem I'm trying to solve:</p> <p><a href="https://i.stack.imgur.com/Lh2K6.png" rel="nofollow noreferrer"><img src="https://i.stack....
3
1,334
how i can minimize column width in a table in html?
<p>i have a table like this</p> <p><a href="https://i.stack.imgur.com/2KlqD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2KlqD.png" alt=""></a></p> <p>but i want the options column to be small like this </p> <p><a href="https://i.stack.imgur.com/cEo6C.png" rel="nofollow noreferrer"><img src="h...
3
1,111
Stubbing push notifications with sinon
<p>I would like to test a function that sends a push notification. I would like to stub the notification send. I use mocha and sinon. I tried to stub with several syntax, but it's not working. One stub I tried:</p> <pre><code>var sender = sinon.createStubInstance(gcm.Sender); var gcmReturn = { multicast_id: 1, ...
3
1,263
Improving Performance - Symbolic function applied to each row of numpy array
<p>I have a list of input vectors that I need to use as inputs to a list of functions that are generated using SymPy. In the real application, the number of input vectors is ~100k, and there are ~5M sets of symbolic functions. This is currently the bottleneck in my code, so I'm trying to speed things up.</p> <p>I've a...
3
1,413
BottomSheet with autofocused TextField does not follow the keyboard on Web
<p>I've tried using MediaQuery, isScrollControlled, scroll containers, extra paddings, all from this other question: <a href="https://stackoverflow.com/questions/53869078/how-to-move-bottomsheet-along-with-keyboard-which-has-textfieldautofocused-is-t">How to Move bottomsheet along with keyboard which has textfield(auto...
3
2,074
ORA-00060: Deadlock Trace file query found but can we get its parameter values
<p>As this ORA-00060 is quite famous and I too have analyzed it in past and have solved a few of them in past. In my case I have ensured there is no common update from multiple session, still the error was occurring, and for such solutions I have used to increase the initrans and frequent commit in the concurrent trans...
3
1,089
How can I make two windows show at the same time?
<p>I am trying to make a game with pygame and face recognition. In order to do that I need to windows open. The one with the face recognizing one and one with the game one. But when I imported the face_recog.py , the game window wouldn't show until the face_recog would be closed. What should I do??</p> <p>I tried impo...
3
1,978
NetBeans, GlassFish JPA and MySQL
<p>I am trying to create a web application in NetBeans using JPA (EclipseLink) and MySQL. When I try to run the application, I get this error in the GlassFish application server.</p> <p>The glassfish-resources.xml looks fine.</p> <p>However, I don't see the connection pool mysql_mysql_rootPool under the glassfish ser...
3
8,286
tikxml and Gradle
<p>I'm trying to use <a href="https://github.com/Tickaroo/tikxml" rel="nofollow noreferrer">tikxml</a> library. I put this in build.gradle (app) :</p> <pre><code>apply plugin: 'com.neenbedankt.android-apt' ... dependencies { ... // tikxml compile "com.tickaroo.tikxml:annotation:${libs.tikxml}" comp...
3
1,668
Strange behavior in Rails 4.2.0.beta2 - Is this a bug?
<h1>Get a 500 error on <strong>every other</strong> window reload.</h1> <p><code>assets/application-CACHE-.js</code> not found. No Idea what is causing it. Development environment. Using Unicorn as my webserver. Anyone know what this is?</p> <pre><code>17:07:13 web.1 | 127.0.0.1 - - [15/Oct/2014:17:07:13 -0400] &quot;...
3
5,534
OrderByDescending operates incorrectly due to integer overflow
<p>While browsing the .Net Framework source code for the Enumerable class it has occurred to me that its internal EnumerableSorter class <a href="http://referencesource.microsoft.com/#System.Core/System/Linq/Enumerable.cs,b388a66d2fbcb2a6" rel="nofollow noreferrer">CompareKeys method</a> used for sorting has a followin...
3
1,412
Hovering over divs not affecting div
<p>I've created a few hover conditions in my CSS for certain divs. One, I've tested a parent relationship transition (#playing-field:hover #cont2) and the other I've tested a self transition (#piccont2:hover), both of which seem to not work properly. The only hover I could possibly get to work is the a:hover.</p> <p>C...
3
1,541
1 Error needs fix - cannot make a static reference to the non static method
<p>This is my first post and first venture onto a forum about Android Development.</p> <p>I've been working on this small android app for the last week and half and have done about as much as possible without anyone's help so far via online tutorials.</p> <p>I have a specific issue now which I have not been able to r...
3
10,085
cakephp probleme with pagination and file_get_contents
<p>I develop a back-end for a mobile application with cakephp</p> <p>I have a function that list cities and I want to calculate distance from the user the this cities the code is:</p> <pre><code>$origins='origins=casablanca,maroc'; $destinations='&amp;destinations='; $url='http://maps.googleapis.com/maps/api/...
3
1,782
how to delete listview items
<p>Hi i want to check all listview items and to delete those items from database as well as from the listview.If all listview items are selected and any only one of the listitem is unchecked then the checked items have to be deleted.For this iam using menu's.How can i implement like this? Iam using the below code:</p> ...
3
3,455
request.POST.get didn't get the input value
<p>So, what I was trying to do is that user input a base64 encoded image and than convert it to text via pytesseract OCR. The problem is every time I tried to input it only reload the page and nothing happens.</p> <p>Here's my html snippet :</p> <pre><code>&lt;form method=&quot;POST&quot; action=&quot;{% url 'ocr-view'...
3
1,162
Using Pivot or UnPivot to get Output Dynamically
<p>I have a table with the following structure that I want to receive output from this table dynamically. But I do not know how to use Pivot and UnPivot.</p> <p>The list of fields I use is as follows.</p> <pre><code> SELECT [RoomID] ,[RoomNumber] ,[RoomType] ,[RoomTypeDescription] ...
3
2,584
React state variable being overwritten (useState)
<p>I am having an issue where it seems my state variable is being overwritten by the default/initial value I set when calling useState(). I have <code>const [token, setToken] = useState(&quot;&quot;)</code>. I pass in the <code>setToken</code> function to my <em>Login</em> component, and when I log in I update the toke...
3
1,190
End flow/coroutines task before go further null issue
<p>Fragment</p> <pre><code> private fun makeApiRequest() { vm.getRandomPicture() var pictureElement = vm.setRandomPicture() GlobalScope.launch(Dispatchers.Main) { // what about internet if (pictureElement != null &amp;&amp; pictureElement!!.fileSizeBytes!! &lt; 400000)...
3
1,427
Why is "fputcsv" output a single column instead of multiple columns and rows
<p>I am an absolute beginner with PHP. My problem is twofold, first I have a list of ancestor names and each name has 13 key =&gt; value pairs. I need my output to have a single row of headers ($keys) and mutiple rows of matching $values. My code at present repeats the header keys with each name and all the output is i...
3
1,114
Uri from Intent is different with different Devices
<p>I am trying to open files by using Intent.ACTION_GET_CONTENT like in this post: </p> <p><a href="https://stackoverflow.com/questions/36128077/android-opening-a-file-with-action-get-content-results-into-different-uris">Android opening a file with ACTION_GET_CONTENT results into different Uri&#39;s</a></p> <p>But he...
3
2,221
jQuery hover fadeIn fadeOut problem
<p>I just got back to html, javascript and jquery and i'm a bit rusty. I've mostly been doing objective-c for a while and getting back to jquery is a little difficult. I'm trying to use the jQuery fadeIn and fadeOut bit but its not working for some reason... Here's the html and js I've been working on :</p> <pre><code...
3
1,156
Micronaut error on calling repositry Context does not contain key: io.micronaut.tx.STATUS
<pre class="lang-java prettyprint-override"><code>import io.micronaut.core.annotation.NonNull; import io.micronaut.data.annotation.GeneratedValue; import io.micronaut.data.annotation.Id; import io.micronaut.data.annotation.MappedEntity; import io.micronaut.data.model.query.builder.sql.Dialect; import io.micronaut.data....
3
1,295
My program is having slight precision errors
<p>So I'm trying to program a way to solve linear equations in java but when doing math like 24.4-11.6 it has an error where it outputs 12.79 instead of 12.8 here's the code I got, I tried to work around the issue by converting the number to an int by multiplying it by 10000 and the doing the math, after which i divide...
3
1,864
Data queried from Cassandra cannot be filtered on same column again (InvalidQueryException)
<p>I am trying to query a large chunk of data by time from cassandra, and then use spark Datasets to get smaller chunks to process at a time, however, the application fails with an invalid query exception: </p> <pre><code>WARN 2018-11-22 13:16:54 org.apache.spark.scheduler.TaskSetManager: Lost task 0.0 in stage 2.0 (...
3
1,751
Umbraco - Create Configuration Section at runtime with config source
<p>I'm developing an umbraco package which uses custom configuration.</p> <p>My need is to create the configuration section during the intall process.</p> <p>With packageActionsContrib it works fine, the code add a configSection as needed and creates a node:</p> <pre><code>&lt;section name="LogServiceConfiguration" ...
3
1,324
Unknown type name 'MTLResourceID'
<p>I am trying to try out the new Metal 3 Apple Sample Code but I get an error in the <a href="https://developer.apple.com/documentation/metal/metal_sample_code_library/rendering_reflections_in_real_time_using_ray_tracing" rel="nofollow noreferrer">Rendering reflections in real time using ray tracing</a> Project tellin...
3
1,520
How to pass multidimensional arrays of pointers in function parameter, and manipulate it?
<p>So I have an array of pointers that this defined like so :</p> <pre class="lang-cpp prettyprint-override"><code> sf::Sprite * game[3][3] = {{nullptr, nullptr, nullptr}, {nullptr, nullptr, nullptr}, {nullptr, nullptr, nullptr}}; </code></pre> <p>It was working perfectl...
3
1,135
Asp.Net Core 3.1 LinqToDB.Identity UserManager CreateAsync Error
<p>I have implemented LinqToDB.Identity into my project. I have been trying to create a user by using .Net Identity UserManager, but I am getting an error. I have also implemented LinqToDB.Identity optimizations, such as AddLinqToDBStores and IdentityConnectionFactory.</p> <p>As I have mentioned about it, I am getting ...
3
1,574
Stack frame appearance during recursion. C vs assembly
<p>I'm just learning about functions in assembly and the stack frame and so on, so I've been looking at the stack frame in gdb as I run a recursive algorithm to see what happens.</p> <p>If I run some recursive code in C, the stack looks like I expect it to - an object on the stack for each call of the function. At th...
3
1,545
Creating a pipe with dup2
<pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt; #include &lt;unistd.h&gt; #include &lt;sys/stat.h&gt; #include &lt;fcntl.h&gt; int main(void) { int pfd1[2]; int pfd2[2]; pid_t pid1, pid2, pid3; if(pipe(pfd1)==-1) { perror("Creazione pipe"); exit(E...
3
1,858
Binding IsSelected on ListViewItem not working for me in UWP application
<p>I'm working with a list of objects that have a <code>Selected</code> property and I'm trying to bind it to the <code>IsSelected</code> property on <code>ListViewItem</code> within a multi-select <code>ListView</code> control in UWP.</p> <p>I just can't seem to get the binding to work. The checkboxes in the <code>Lis...
3
1,269
Angula-leaflet + json markers
<p>I am using leaflet to display a map with center view on America, I would like to display all the markers I am also wondering is it because of the huge amount of data I have that it is not displaying or is that not a problem? I have around 12000 units. I am unable to display the markers. I have a JSON file and I have...
3
1,284
How to replace if-else "months" code to "months" from enum's?
<p>I'm trying to replace my if-else statement with the enum code I just created on other .java file. However Im not sure how can I replace it with the enum code provided below. Since the if-else code feels repetitive and I thought maybe enum can help shorten the Main.java file.</p> <p>Main.java</p> <pre><code>if (month...
3
1,308
docker-compose service cannot access another service through its name
<p>I am quite new to docker but after watching a few tutorials I gathered that if I wanted my services to have common code I had to use docker-compose.</p> <p>This is my directory structure:</p> <pre><code>- project - docker-compose.yml - packages - common - src - eureka ...
3
2,555
SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize
<p>Using Ebay : AddFixedPriceItem Method to create item on Ebay </p> <p>Post URL : <a href="https://api.ebay.com/ws/api.dll" rel="nofollow noreferrer">https://api.ebay.com/ws/api.dll</a></p> <p>Postman Header :</p> <pre><code>"x-ebay-api-app-name: MY_App_ID", "x-ebay-api-call-name: ReviseFixedPriceItem", "x-ebay-api...
3
2,637
Moving Code to Debian Caused "Use multi=True when executing multiple statements" Error Statements
<p>I have been running python scripts making calls to MySQL on a machine with Ubuntu 20.04 LTS. I just recently moved those scripts over to a server running Debian 10.</p> <p>Both servers have MySQL 8.0.21 installed. Python 3.7.3 is on the Debian server, and Python 3.8.2 on Ubuntu. When I execute the python scripts on ...
3
1,123
Android cannot connect socket from background service
<p>I have a broadcaster that receives boot complete broadcast and start a service that connects to a server socket. If I start the service from the main activity the socket can connect, but when the service is started from the broadcast receiver, it cannot connect, simply wait and then timed out exception occurs.. </p>...
3
1,795