title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Corona Runtime Error "attempt to concatenate field '?' (a nil value)"
<p>i have this 8 question survey in my mobile application handover project. At first the corona did not prompt me any error message and the app works just fine but when i add 2 more question to it i start getting this message error <a href="https://i.stack.imgur.com/CIG2X.png" rel="nofollow noreferrer"><img src="https:...
2
1,129
Viewpager - setCurrentItem(1), the fragment parent fragment doesn't get onActivityResult() when child fragment calls startActivityForResult
<p>So I have a nested Fragment and view pager scenario. I have an activity that loads ParentFragment. ParentFragment has a ViewPager that has 4 fragments. Normally the view pager starts at 0. But because I want to help the user return back to their previous position, I wanted to see what happens if I use setCurrentItem...
2
1,152
Jackson module not registered after update to Spring Boot 2
<p>I'm as upgrading from Spring Boot 1.5.21 to 2.2.5.</p> <p>I need to use <code>MonetaryModule</code> to deserialize rest calls, and depending on Spring's <code>ObjectMapper</code>.</p> <p>I have defined such a bean for this module in a some <code>@Configuration</code> class (<code>MonetaryModule</code> is extending...
2
1,830
How to add a delay to a WPF program without blocking the UI
<p>I am building a device emulator. When it starts, it takes some time for it to initialized. This would be logically represented by being turned on and going immediately to an "Initialization" state, and after some time it goes to "Ready" state.</p> <p>I am using MVVM, so the ViewModel will for now represent all the ...
2
1,051
Showing events for multiple eventSources depend on checkboxes' choice in Fullcalendar
<p>I'm adding the feature like in Solgema Fullcalendar - <a href="http://plone.org/products/solgema.fullcalendar/releases/2.1.2" rel="nofollow">http://plone.org/products/solgema.fullcalendar/releases/2.1.2</a> (selecting and showing events with checkboxes selection)</p> <p>My eventSourses look like:</p> <pre><code>ev...
2
1,683
Google Static Map Image not showing on popup
<p>I load Google Static Map on popup and set Image URL of image dynamically. Source Code displays correct address but not shown on page at page load. If I hover mouse into the source code of Image then it gets loaded into source Code ( e.i. Firebug in Firefox)and if I reopen the popup, Image loads successfully. Please ...
2
4,306
Print heading and corresponding paragraph in beautiful soup
<p>Here is my code</p> <pre><code>soup = BeautifulSoup(open('MUFC.html')) a_tag = soup.find_all() f=open('out.txt','w') i=0 while(i&lt;len(a_tag)): if(a_tag[i].find('&lt;h1&gt;') or a_tag[i].find('&lt;h2&gt;') or a_tag[i].find('&lt;h3&gt;')): f.write(a_tag[i].get_text().encode('utf-8')) f.write('\...
2
1,307
I keep getting an inaccurate location in Android
<p>my app records the gps location on a button click; however when I do it says I'm about three blocks away and is extremely inaccurate. Can you take a look at my code to see how I can improve it? Thanks</p> <pre><code>@Override protected Void doInBackground(Void... arg0) { SharedPreferences prefs ...
2
1,884
Stripe.js v3 elements requiring double tap to focus (but only on iPad/iPhone)
<p>I've been working with Bootstrap 4 beta and Stripe.js v3. If you're not familiar with this newer version of Stripe.js, it's basically injecting iframes into spans, and making the spans act as if they are form inputs. I'm not in love with the idea, but it's supposedly more PCI compliant that the older version of Stri...
2
3,241
Fetch request inside function. How to put it in ComponentDidMount?
<p>As you can see, my handleSearchRequest function is calling an API , which is later called by an onClick event inside the IconButton tag.</p> <p>How do I load the API inside ComponentWillMount, the way I can still write stuff on HandleSearchRequest like setState or something so Onclick can still call this function ?...
2
1,876
python - How to resolve KeyError when pulling from a json dictionary
<p>I'm working on a project where I'm utilizing the Foursquare API to pull venue information from locations around Portland. I've been having an issue when trying to pull information from the json dictionary and structuring it into a dataframe using a custom function I wrote. For some reason, the function I wrote is fl...
2
3,816
Non-equi join using data.table: column missing from the output
<p>I am doing a left non-equi join using <code>data.table</code>:</p> <pre><code>OUTPUT &lt;- DT2[DT1, on=.(DOB, FORENAME, SURNAME, POSTCODE, START_DATE &lt;= MONTH, EXPIRY_DATE &gt;= MONTH)] </code></pre> <p>The <code>OUTPUT</code> contains a correct left join, with the exception that the <code>MONTH</code> column (...
2
1,273
Selenium RC gives Error-Object [object HTMLIFrameElement] has no method 'getCurrentWindow' while running the test in Google Chrome
<p>I am using Selenium RC and Chrome when I run the test it gives me this error</p> <pre><code>error(1340708572726): Unexpected Exception: Object [object HTMLIFrameElement] has no method 'getCurrentWindow' </code></pre> <p>However I am not always getting this error. Some times the test passes and sometime the very test...
2
2,089
Android cipher.doFinal got BadPaddingException when try to decrypt after reopen app
<p>Question may be long but I will try to describe it in detail.</p> <p>Here is a <a href="https://github.com/LxxCaroline/FingerprintSample" rel="noreferrer">demo</a> has issue like mine. </p> <p>I have an android app and I want to add a function, which allow user to encrypt and save their passwords in SharedPreferen...
2
2,945
Getting 'java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map' while trying to fetch data from firebase
<p>I'm trying to fetch some data from <code>Firebase</code>, but getting this error: <code>java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map</code> while trying to do so.</p> <p>Here's what I'm trying;</p> <pre><code> public void retrieveUserCounterAccepted() { databaseRefe...
2
1,246
Memory Error when trying to compute Cosine Similarity Matrix on TFIDF vector
<p>I am <strong>trying to build a Movie Plot (content) based recommender function</strong> in python3 to which takes a movie title as an argument and outputs movies with most similar plots.</p> <p>My wrangled data has <strong>Shape of (45466, 8)</strong> This is what the head of wrangled data looks like:</p> <p><a h...
2
1,481
numTicks variable not incrementing
<p>I have the following sketch, and the numTicks variable is not incrementing, the sketch compiles fine to the Arduino, but for whatever reason the variable "numTicks" is not incrementing.</p> <pre><code>/* * kegboard-clone-4-KegCop * This code is public domain * * This sketch sends a receives a multibyte String f...
2
2,242
Ember-Simple-Auth-Torii: How can i handle server side authorizatoin with devise-omniauth
<p>Hi I have a ember app with frontend with <strong>ember-cli-simple-auth-torii</strong> &amp; <strong>ember-cli-simple-auth-devise</strong> backend with devise and omniauth-facebook</p> <p>THe torii gives you an authorizationCode on login in with facebook and what we do with this authorization code is upto us.</p> ...
2
2,334
Carrierwave upload works in Rails 4.x but not Rails 5
<p>I have code that I've made into a dummy test site to validate. This code works exactly as intended when using Rails (4.2.5.1) but fails when using Rails (5.0). I do not understand where the actual issue is.</p> <p>My specific error is <code>Attachment article must exist</code>, which tells me somehow I am not passi...
2
1,245
Magento theme crash - Error 500 on theme images
<p>I successfully created a few magento themes, which are all running fine on the webservers. Because that there were some changes from other developers done on the webserver (also running fine) I tried to import all files from my theme back to my local system to apply some fewer changes. After that my theme on the loc...
2
1,220
Django: In django-tables2 how to modify the way URLField gets rendered
<p>I'm new to Django and I'm building a web-page which displays model's info in a table format. I discovered for myself a very useful library - django-tables2 which makes building html tables very simple. </p> <p>However, I am not able to figure out how to customize the rendering of one of the table columns. Specifica...
2
1,038
save state and value of radio button
<p>in the main activity i have radio buttons , in the method public void onRadioButtonClicked(View view) i associate each radio button selected with a value, so i have two variables a and b, after that i click on the button bton i have according to the method ajouter, a and b values into database.Until now everything i...
2
2,033
React Grid - setState not triggering render in Grid
<p>This is driving me nuts! I have tried all those tricks to get this data to render using lifecycle methods to compare prop data to current state of the row data in my component but it would seem that maybe React Grid with the row prop is not updating because I can see the console log of the rows with data in my con...
2
3,340
Symfony 3 - Forms - Persist Entity - Choices are NULL
<p>I'm new to Symfony and cannot easily find Symfony 3 answers to my question.</p> <p>Problem : I have a basic form setup which populates select boxes with basic id+name Entity values (Country, Company, Partner, etc.)</p> <p>All the select boxes are correctly populated from the DB. However when I try saving the popu...
2
1,616
CakePhp 'contains' versus a forced joining?
<p>So, I'm working with CakePHP on and MVC based project to join together a series of tables. In my research, I found two primary ways of doing these joins.</p> <p>'contain' - which focuses on using the existing associations in the Model of the MVC framework.</p> <p>'forced joining' - which is similar to SQL's INNER ...
2
1,584
How do I sync Couchbase-Lite Android with CouchDB?
<p>The problem: During a push I get a "Bad Request" error and some sort of authentication error even though it gets a positive response.</p> <p>I have almost no experience with CouchDB or Couchbase, but from what I understand you'd usually sync Couchbase-Lite with Couchbase Sync Gateway, but since the latter uses Couc...
2
1,284
Android Studio Error: Execution failed for task ':app:processDebugManifest'
<p>I am completely new to Android Studio so it may sound a silly thing to an experienced person.</p> <p>I am getting an error in Android Studio which states:</p> <pre><code>Error:Execution failed for task ':app:processDebugManifest'. &gt; Manifest merger failed : Attribute meta-data#android.support.VERSION@value val...
2
1,916
Style Trigger for different images and border background
<p>I Want to use different <em>Border Background</em> and Different Images (each image must use different background color) how i change use <em>StyleTrigger</em> to do it ? (Now it just show red border for all images)</p> <pre><code>&lt;DataTemplate&gt; &lt;Border BorderThickness="1" Width="18" Height="18" Corner...
2
1,039
AWS Kinesis Consumer Python 3.4 Boto
<p>I am trying to build a kinesis consumer script using python 3.4 below is an example of my code. I want the records to be saved to a local file that I can later push to S3:</p> <pre><code>from boto import kinesis import time import json # AWS Connection Credentials aws_access_key = 'your_key' aws_access_secret = 'y...
2
1,161
Drawing linechart in Swift with 1000+ datapoints
<p>So I have Custom view an I'm trying to draw line chart there. First I draw xGrid, yGrid and middleline. Here are my functions to do that:</p> <pre><code>var width: CGFloat = 400 var height: CGFloat = 200 var xLines: CGFloat = 20 var yLines: CGFloat = 10 let color = NSColor.blackColor() func drawMiddleLine() { ...
2
1,287
Send a message to and get back a response from a message driven bean
<p>I'm trying to have a response back to a message driven bean but for an unknown reason I am not able to make work the communication correctly. </p> <p>here is it the stateful bean. It send an object message and after create a temporary queue where receive the response.</p> <pre><code>@Stateful public class BookingM...
2
1,925
How do I populate a list field in a model from javascript?
<p>I have a Kendo.MVC project. The view has a model with a field of type List&lt;>. I want to populate the List from a Javascript function. I've tried several ways, but can't get it working. Can someone explain what I'm doing wrong?</p> <p>So here is my model:</p> <pre><code>public class Dashboard { public Li...
2
2,115
R figure being cropped
<p>Here's a bit of a basic question, you'd think R would automate this always. I'm making a heatmap (basic stuff, png() into heatmap.2() into dev.off()), and my row labels get cleaved off on the right hand side, along with a tiny part of the dendrogram on the left:</p> <p><a href="https://i.stack.imgur.com/ToFXi.png" ...
2
9,152
Does the onClickListener not update the UI until all of the code inside it has run in Android?
<p>I have an onClickListener that triggers a network call so I would like to have some way to show the user that communications are in progress. The problem I am running into is that I can't seem to throw up a ProgressDialog or change the UI in any way for that matter before the call is made inside the onClick Listener...
2
1,906
MySql Replication not working properly with replicate-wild-do-table
<p>I am creating the MySQL master-slave replication on CentOS 7 below are the configuration files details of both the server:</p> <h2>Master server's my.cnf</h2> <pre><code>[mysqld] server-id=1 log-bin=mysql-bin datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock symbolic-links=0 sql_mode=NO_ENGINE_SUBSTITUTI...
2
1,916
How to break out of a hanging ajax call and load another page
<p>I'm developing a invoice app. Currently i'm using OO php to build invoice-objects. The objects themselves contain objects for customer, products, invoice details, firm.</p> <p>Now i'm working on a page to make an overview. The problem that occurred was, when i had too many invoices (tested with only 1500 dummy invo...
2
1,485
Failed to apply plugin [id 'org.jetbrains.dokka']
<p>when I was trying to improt gradle project (spring-framework-master) to eclipse then Appear this error informations : what I hava down </p> <hr> <h2>the first step :</h2> <h2>gradlew cleanIdea :spring-oxm:compileTestJava</h2> <p>FAILURE: Build failed with an exception.</p> <ul> <li><p>Where: Build file 'D:\spri...
2
8,400
dyld: Library not loaded when using Qt QtWebEngine
<p>I am getting this error when trying to run my app after using macdeployqt.</p> <p>dyld: Library not loaded: @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick Referenced from: /x/build-x-Desktop_Qt_5_4_2_clang_64bit-Release/x.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/5/QtWebEngineC...
2
1,237
Runtime error using socket.io in typescript bundled by webpack
<p>I was trying to make use of web-sockets via socket.io in a typescript written node server with expressjs. Bundled with webpack.</p> <p>The server code Looks as follow:</p> <pre><code>import * as Express from "express"; import * as SocketIO from "socket.io"; import * as Http from "http"; const app = Express(); ap...
2
1,672
Use @ViewChildren/@ContentChildren in combination with router-outlet
<p>I am trying to build this : </p> <pre><code>┌--------------------------------------------┐ | -Page 1- -Page 2- -Page 3- | ├----------┬---------------------------------┤ | Link 1 | &lt;router-outlet&gt;&lt;/router-outlet&gt; | | Link 2 | | | Link 3 | ...
2
1,143
C# MetroFrameWork how to Close a MetroForm
<p>Hello I'm using the metroframework UI using this <a href="https://thielj.github.io/MetroFramework/" rel="nofollow">library</a> but i cannot close a winform the This.Close(); is not working for me, Its a log in form after the MySQL select query gets a result it will open another winform(Main) then i want to close the...
2
1,357
Angularjs text / data not showing up
<p>I am building a very basic angular app to learn. My app basically loads a list of users and prints them all out on the home page with a checkbox next to each name and also displays the number of present users. </p> <p>The list of users appears to work - I have 11 users and 11 checkboxes show up. HOWEVER, the actual...
2
2,143
How to close infobox on zoom out
<p>I have a map with some markers and markerclusters and it's working fine. I added InfoBoxes to them and they work but the problem is, when I zoom out and an InfoBox is open, the marker will disappear (and get aded to the markercluster) and the box will stay there, open with no marker below.</p> <p>I could work with ...
2
1,114
JavaFX Chart Series ConcurrentModificationException
<p>I'm building a genetic algorithm on JavaFX and I want to have a chart that will update the average and the maximum fitness of every generation. I have A button, that does 20 generations, updates the graph every iteration and also the progress bar.</p> <p>The code used to be simplier, without all those duplicares a...
2
1,694
Angular cell renderers don't get ICellRendererParams in init
<p>I'm trying to make a cell renderer for making IP addresses into click-able SSH links using Angular. The renderer component:</p> <pre class="lang-js prettyprint-override"><code>import { Component, OnInit, OnDestroy } from &quot;@angular/core&quot;; import { DomSanitizer, SafeUrl } from &quot;@angular/platform-browser...
2
1,188
accessing watchlist history in xgboost r package
<p>I'm using the xgboost R package to perform a multi-class classification task. This is a piece of code I create to illustrate the problem(input and output are randomly generated so results of course makes no sense, it's something I've done just to play around and learn how to handle the package):</p> <pre><code>requ...
2
1,117
Postfix as SMTP Relay appears unsecure to GMail
<p>I am currently trying to set up postfix on RHEL as an SMTP Relay for our internal ticketing system.</p> <p>The basic configuration is running and working fine; mails get send and recieved. We do alter some headers to secure our internal networks, but that's about it.</p> <pre><code>Trying 10.71.17.107... Connected...
2
1,561
HtmlUnit Javascript Error
<p>I am trying to emulate pressing a JS "Continue" button (using HtmlUnit) which submits a hidden form, and then retrieve the HTML/XML source of the page after submitting the form. On a regular browser, the button appears after a 1 second delay (replacing some text). However, upon loading the page in HtmlUnit I receive...
2
2,199
How to test a combineLatest observable with RxTest?
<p>So I have this viewModel which has a validation observable that is simply the combination of 5 other signals into a boolean.</p> <pre><code>import RxSwift class SchedulingFormViewModel: BaseViewModel { let places = Variable&lt;[String]&gt;([]) var formIsValid: Observable&lt;Bool&gt;! override init()...
2
1,792
Using FileField/ImageField with Swagger UI and drf-spectacular
<p>I have a Django REST Framework project which uses a <code>ModelViewSet</code> to create APIs for a model containing a <code>FileField</code>.</p> <p>I've shared a full example of a Django project demonstrating this issue <a href="https://github.com/LondonAppDev/drf-openapi-filefield-issue" rel="nofollow noreferrer">...
2
1,085
Windows vs Linux - C++ Thread Pool Memory Usage
<p>I have been looking at the memory usage of some C++ REST API frameworks in Windows and Linux (Debian). In particular, I have looked at these two frameworks: <a href="https://github.com/microsoft/cpprestsdk" rel="nofollow noreferrer">cpprestsdk</a> and <a href="https://github.com/yhirose/cpp-httplib" rel="nofollow no...
2
4,313
Encoded string from UIImage return null
<p>I used this answer to convert a UIImage in a NSSstring, </p> <p><a href="https://stackoverflow.com/a/11251478/3741799">https://stackoverflow.com/a/11251478/3741799</a></p> <p>to encode</p> <pre><code>- (NSString *)encodeToBase64String:(UIImage *)image { return [UIImagePNGRepresentation(image) base64EncodedString...
2
1,072
printing Arabic text using prn File on TSC TC200
<p>I am using a c# code to create prn file and print on the TSC TC200 barcode label printer. However when I try to print arabic characters, it does not print properly. I have downloaded the arabtype.ttf on the flash memory of printer but it still print the unicode and not the actual characters.</p> <p>Here is my prn...
2
3,936
how to set google maps to 100% height in ngMap
<p>Hey I am using <a href="https://ngmap.github.io/" rel="nofollow">ngMap</a> in order to display google map components. Now for a very basic example, I am using bootstrap and try to put the google map on half of the screen,therefore I give it col-lg-6. </p> <p>But apparently I get always the same height which is 300p...
2
1,599
Fade in content, then fade out, then fade in new content
<p>What I'm trying to do:</p> <pre><code>#leftSide #rightSide (display:none) _______________ _______________________________________________ | | | | category | | | -link | ...
2
2,011
howto paginate my search result in handlebars
<p>When i search---products are displaying..but when i click on page 2 it gets error...how can i paginate the search results in handlebars..</p> <p>This is my search route.</p> <pre><code>router.get('/products-search',function(req,res,next){ const perPage = 1; const page = req.query.page || 1; const title...
2
1,370
Scraping ASPX with cURL - results from subsequent pages
<p>I am building a web scraper using PHP curl methods to scrape results from an ASPX page. I successfully got it to scrape the first results page but the problem arises when I try to get the results from subsequent pages I get a runtime error.</p> <p>I looked through all the hidden fields and only found __VIEWSTATE an...
2
1,226
android java/kotlin recyclerview items not visible
<p>i am trying to build an app that scans for bluetooth devices and displays them in a recyclerview. i am writing some of the app using java and some of the app in kotlin. for some reason my recyclerview items aren't visible. somebody please help me to find what mistake that i am making. i am posting the code for my ac...
2
1,985
webservice method parameter always null
<p>I created a C # webservice through a WSDL from another webservice made in PHP. All calls work but the parameters sent in xml always arrive null. This is my code:</p> <pre><code>[WebService(Namespace = "urn:PGSMS")] [GeneratedCode("System.Xml", "2.0.50727.3082")] [System.Xml.Serialization.SoapType(Namespace = "urn:P...
2
1,518
Sorting Gridview When In Edit Not Working
<p>In my application I am sorting the gridview and also have Edit in that gridview, sorting works fine but when i click Edit, it puts the gridview in the original sorted order. when i click Edit - it lets me edit the row but it changes the order and show me the original record on that row in the edit mode.</p> <pre><c...
2
2,822
JAGS error message - Node inconsistent with parents
<p>The dataset contains ~11,000 rows so I have been scaling it back whilst checking that the code runs. All of the rows contain information extracted from Sentinel-2a images and a digital elevation map whilst a subset of 117 cells also contain habitat covariates recorded on a field trip. As such, some of the columns, i...
2
3,185
Execution failed for task ':app:transformClassesWithInstantRunVerifierForDebug'. > java.lang.NullPointerException (no error message)
<p>I am new to android studio would anyone please help? I get below error randomly when I run my app. Here is my Gradle output.</p> <p>I tried below links but not found proper solution for this</p> <p><a href="https://stackoverflow.com/questions/33913783/execution-failed-for-task-apptransformclasseswithdexfordebug">E...
2
1,669
PHP authentication and authorization
<p>I've got a front controller which routes all the requests to their related Controller.</p> <p>Now, I need to implement a structure like <strong>USERS - ROLES - SERVICES</strong>, where in Services I should put those things that the users can or cannot do (e.g. deleting a product).</p> <p><code>Users</code>, <code>...
2
2,038
Caching does not exist in namespace Microsoft.Extensions
<p>I am moving some logic from a micro service to a azure function.</p> <p>Things are going pretty smoothly, however I have run into a dependency issue. I had some caching features in the micro service that I would like to keep in the azure function, however the function project will not build because it cannot resolv...
2
1,316
Flutter app gets crash after update: java.lang.IllegalAccessError, how to avoid this problem?
<h2>Flutter app crashes after update in play store</h2> <p>I had massive amount of crash at google play console with this type of error: java.lang.IllegalAccessError</p> <p>About 20% of user had this crash when updated app at play store:</p> <pre><code>java.lang.IllegalAccessError: at androidx.room.v.e (Unknown Sour...
2
3,678
Passing group name of a user in context and accessing in template in django
<p>I have used mixins with class-based views in my django app. I also have created a group named Instructors to allow only user belonging to this group to have certain permissions which are to edit, add and delete a course object. In the <strong><em>ManageCourseList View</em></strong> which is responsible for rendering...
2
1,354
How to modify parent component's css property from child component in Angular
<p>Is there any way to modify parent component's css property from child component without affecting it globally ?</p> <p>I have tried following options -<br> 1 Using <code>ViewEncapsulation.None</code> in child and then modify parent component's style(i.e. class). But it changes the style for all components. <br><br...
2
2,731
Apache Reverse Proxying CGI scripts
<p>I have a web application called <a href="http://www.steveshipway.org/software/rrd/f_routers.html" rel="nofollow noreferrer">routers2.cgi</a> which I am trying to proxy via an Apache 2.4 proxy server which does not work at the moment. </p> <p><strong>Direct URL to the web application server</strong></p> <pre><code>...
2
1,371
can activate route guard angular cannot satisfy interface while executing logic
<p>I have the following can activate route guard class</p> <pre class="lang-js prettyprint-override"><code>import {OnDestroy } from '@angular/core'; import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router'; import {Injectable} from '@angular/core'; import {UserAuthoriz...
2
1,419
Execute on enter-key-press
<p>I have this code</p> <pre><code>&lt;script&gt; function cA( url ) { document.myform.action = url; } &lt;/script&gt; &lt;input type="whatever" name="whatever" id="whatever" /&gt; &lt;button class="whatever-button" id="defaultAction" value="Go for it" name="whatever" type="submit" onClick...
2
1,206
How to put EOF(end of file ) in code::blocks?
<pre><code>#include &lt;iostream&gt; using std::cout; using std::cin; using std::endl; int main() { int grade, aCount = 0, bCount = 0, cCount = 0, dCount = 0, fCount = 0; cout &lt;&lt; "Enter the letter grades." &lt;&lt; endl &lt;&lt; "Enter the EOF character t...
2
1,041
Dispatch action to redux from react-native-router-flux event
<p>I'm using <code>react-native-router-flux</code> and I don't know how to dispatch a redux action from within the toolbar actions, depending on the state when the user selects an action from the Toolbar, for example if the user is logged in and it presses the user button in the toolbar it should navigate to his profil...
2
1,053
Converting Uint8Array crashing browser for large files
<p>Have an app where there is an input of type "file". The following methods grab the file, then prep it to be sent to the server via AJAX.</p> <pre><code>private StartUpload = (files) =&gt; { if (files &amp;&amp; files.length === 1) { this.GetFileProperties(files[0]) .done((properties: IFileP...
2
1,328
Caret not shown in textbox
<p>I use following style for my textbox in WPF:</p> <pre><code>&lt;Style x:Key="myTxtBoUserInputMedStyle" TargetType="{x:Type TextBox}"&gt; &lt;Setter Property="Height" Value="35"/&gt; &lt;Setter Property="Background" Value="Gainsboro"/&gt; &lt;Setter Property="BorderBrush" Value="LightGray"/&gt; &lt;S...
2
1,584
Creating a loop so this animation repeats
<p>I made code to draw points (to look like stars) and i made it move but how do i have this animation repeat and not just stop after a few seconds? What's the best way to do this because i don'T want to waste resources on this animation (if it does not erase the points that have lost the screen);</p> <pre><code>packa...
2
2,142
How can I create a 3D cubic-bezier curved triangle from 3D points in Three.js?
<p>Following <a href="https://stackoverflow.com/questions/54573790/how-can-i-create-a-3d-surface-from-3d-points-in-three-js/54574556">this topic</a>, I am trying to generate a 3D curved triangle as a NURBS surface, but I don't understand how to set up my 3D points to do that.</p> <p>Here is the current implementation ...
2
4,125
AuthorizationCodeInstalledApp - Android Alternative
<p>I'm trying to Authenticate into Google Oauth with Android, I successfully authenticate, store my credentials and auth token but then there's one particular piece of code that I am falling over at; returning an instance of <code>AuthorizationCodeInstalledApp</code>. The problem seems to be that this API is made for J...
2
4,605
Cannot delete Directory on Android rooted device
<p>I have a strange issue, I cannot access/delete or do anythid to Download directory on my sdcard. Here's what i got from adb shell:</p> <pre><code>root@hammerhead:/mnt/shell/emulated/0 # ls -l drwxrwx--- root sdcard_r 2014-11-22 12:17 0 drwxrwx--- root sdcard_r ...
2
1,457
Trying to call enumerateDevices from a frame without correct 'allow' attribute
<h3>Question:</h3> <p>What is causing the below errors and how do I fix it?</p> <p>I found this, but can't read Japanese:</p> <p><a href="https://bisyokuden.com/archives/433" rel="nofollow noreferrer">https://bisyokuden.com/archives/433</a></p> <p>might have something to do with webkit.</p> <p><a href="https://git...
2
1,707
How to display 3 levels of hierarchical menu in WordPress using "wp_get_nav_menu_items"?
<p>I am trying to display 3 levels of hierarchical menu in WordPress using wp_get_nav_menu_items function, but somehow the structure is not displaying in that manner.</p> <p>This is my code which I have included in header file, but the structure is not proper.</p> <pre><code>$menu_name = 'primary-menu'; $locat...
2
1,267
Casting troubles when using bit-banding macros with a pre-cast address on Cortex-M3
<p>TL;DR: </p> <ol> <li>Why isn't <code>(unsigned long)(0x400253FC)</code> equivalent to <code>(unsigned long)((*((volatile unsigned long *)0x400253FC)))</code>?</li> <li>How can I make a macro which works with the former work with the latter?</li> </ol> <h1>Background Information</h1> <h2>Environment</h2> <p>I'm w...
2
1,996
Autowire tag does not work
<p>I am learning Spring.Net. I did a little example to understand the tag autowire but it does not work. Below my classes:</p> <pre class="lang-cs prettyprint-override"><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; using Spring.Context; using Spring.Context.Support; namesp...
2
1,178
Update array at specific index by other filed in MongoDB
<p>I have a collection, consist of <code>name</code> and <code>data</code>.</p> <p><code>data</code> is an array with 2 elements, each element is the object with <code>code</code> and <code>qty</code>.</p> <pre><code>{ &quot;_id&quot; : ObjectId(&quot;605c666a15d2612ed0afedd2&quot;), &quot;name&quot; : &quot;An...
2
2,784
maven multiple test suits in surefire plugin
<p>I am using TestNg and Maven with the surefire plugin to run my tests. I have several different tests that I want to run in the same pom. Currently to do this I have two different XML files defined and i've defined two profiles to run different xml files but this keeps throwing errors!</p> <p>I don't know how I shou...
2
1,099
python apt_pkg to obtain individual pkg details?
<p>I've been using a combination of apt_pkg and apt libraries to obtain the following details from each package:</p> <pre><code>package.name package.installedVersion package.description package.homepage package.priority </code></pre> <p>I was able to obtain what I needed in the following manner, which I'm not entirel...
2
1,102
InnoSetup - Shortcut Icon on desktop corrupted
<p>Shortcuts from start menu and allprograms dir are fine but on the desktop shortcut is completely blank/corrupted?</p> <pre><code>#define MyAppName "MyAppName " #define MyAppVersion "1" #define MyAppPublisher "MyAppName" #define MyAppURL "http://www.MyAppName.com/" #define MyAppExeName "MyAppName.exe" [Setup] ; NO...
2
1,308
OneToMany relation with multiple properties in JSP form
<p>I have this model:</p> <p><strong>Order.java</strong></p> <pre><code>@Entity @Table(name = "`order`") public class Order { private Long id; @OneToMany(fetch = FetchType.EAGER, mappedBy = "order") private List&lt;OrderProduct&gt; orderProducts; @Override public int hashCode() { return n...
2
1,414
knockoutjs html binding not working
<p>I'm trying to use the html binding to bind some html to a label, causing the label to display the specified text.</p> <p>The label does not display any text, but inspecting the page in the browser shows that it uses the html binding to display some text (without the text being displayed).</p> <p>Why is the text no...
2
3,444
Problems compiling C++ programs with wineg++/winelib
<p>I am having trouble compiling C++ programs with <code>wineg++</code>. To illustrate my problem, I have written two test programs.</p> <h3>msgbox.cpp</h3> <pre><code>#include &lt;algorithm&gt; #include &lt;iterator&gt; #include &lt;cstdio&gt; #include &lt;windows.h&gt; int APIENTRY WinMain(HINSTANCE, HINSTANCE, L...
2
2,495
OpenXML/SpreadsheetLight: File contains corrupted data for xlsx - Only happens on server
<p>I'm having a very strange problem. I am trying to use the OpenXML/SpreadsheetLight library to process the data of a user uploaded excel file (only .xlsx not .xls), however I am getting an error when trying to run the code on a live server.</p> <p>I tested the code on my local machine and on a staging server instanc...
2
1,362
Map nested elements to related lists using AutoMapper
<p>I have two sets of objects</p> <p>Objects that I use in C# client application:</p> <pre><code>public class EmployeeClient { public int Id { get; set; } public int DepartmentId { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string MiddleName {...
2
1,514
For C++ Vector3 utility class implementations, is array faster than struct and class?
<p>just out of curiosity, I implemented vector3 utilities in 3 ways: array (with a typedef), class and struct</p> <p>This is the array implementation:</p> <pre><code>typedef float newVector3[3]; namespace vec3{ void add(const newVector3&amp; first, const newVector3&amp; second, newVector3&amp; out_newVector3); ...
2
2,085
Disable create account during WooCommerce checkout when guest checkout is enabled for specified products
<p>I have a WooCommerce store on my wordpress website, and I am trying to enable guest checkout for specific products in my store, and require account creation for other products.</p> <p>I have the following code in my <code>functions.php</code> file to enable guest checkout on products I specify, but when I navigate t...
2
1,398
Why doesn't my fxml controller class move my button?
<p>I have 3 classes with which I'm currently working: ButtonMove.java, MainController.java, and Main.fxml. I've been experimenting with SceneBuilder to create user interfaces and wanted to add motion to an object. I've tried getting this button to move, but to no avail. The stage launches and I see the button, but it r...
2
1,030
Unrecognized option 'c copy'
<p>I have been working on a script as a part of both learning process and creating handy tools. I am trying to loop over a list of video files to extract a certain part of each video on the list. By looking at example scripts and ffmpeg documentation I finally came up with this:</p> <pre><code>import os import sys imp...
2
1,420
How to upload image Android to Server using PHP mysql
<p>I have a problem about uploading images from android to a server, the problem is about the android version, my application can run on android version 2.3 but can not run on version > 2.3. these is my code</p> <pre><code> function TambahLokasi() { $base = $_REQUEST["gambar"]; if (isset($base)){ $suffix = create...
2
8,751
Inserting data of multiple fields into database table using FormData Class of JS?
<p>I need to insert data into MySql database table Using ajax and FormData Class. I can easily solve my this issue with declaring many variables for many <code>&lt;input&gt;</code> using jquery And then put these variables for checks in if-else syntax. But what I need is to use <code>FormData</code> class of JavaScr...
2
1,164
sqlite setBytes() not working for BLOB data type on Windows
<p>I am using sqlite (version 3.7.5) with sqlite jdbc driver provided at <a href="http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC" rel="nofollow">http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC</a></p> <p>I asked an almost identical question few months back at xerial forums (http://groups.google.com/group/xerial/b...
2
2,971
OnClick listener for button inside compound view
<p>I created a compound view which consist of three views, two <code>ImageButtons</code> and one EditText. I am trying to create new "<code>MyView</code>" view everytime button is clicked. Firstly I decided to set onClick in xml hoping that everytime a new MyView is created, it will have listener set already but it doe...
2
1,117
Stripe Custom Field
<p>I have a problem with Stripe. Everything works fine when I write in Cardnumber, CVC etc.</p> <p>But I need to add a custom field so it can work when I write $_POST['ImeiNum'] in charge.php.</p> <p>Here's my code for the HTML and JQUERY (index.html)</p> <pre><code>&lt;script type="text/javascript"&gt; // t...
2
1,472