title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
UITableviewController - Update specific Cells
<p>I have created custom cells with a button that changes the state of a row from "availible" to "bought", and I also have an UIImageview which shows the state. I want the cell to redraw with the new state when the user presses the button.</p> <p>I have been able to get the UIImage to be redrawn after the User scrolls...
2
1,059
Combining @SqsListener and @RequestMapping
<p>We're currently in the middle of migrating our current architecture into Spring-AWS-based microservices. One of my tasks is to research on how our microservices communicate with one another. <em>I'm aiming to set-up a hybrid system of RESTful HTTP endpoints and SQS producers and consumers.</em></p> <p>As an example...
2
1,103
Android gradle multiproject dependency resolution
<p>In my Android project I have a task for copying the build dependencies to an external directory as below:</p> <pre><code>task copyBuildDependencies(type: Copy) { delete "$buildDir/dependencies" afterEvaluate { from configurations.releaseCompileClasspath into "$buildDir/dependencies" ...
2
3,159
Gorm left join with Scan()
<p>I am trying to join to tables <code>Class</code> and <code>Booking</code> on <code>classes.id = bookings.class_id</code> and get the result of the type <code>DisplayBooking</code></p> <pre><code>type Class struct { Id int `json:&quot;id&quot;` Name string `json:&quot;name&quot;` } type Booking struct {...
2
1,207
python - Reading a .csv with multiple languages in column
<p>I am trying to explore the recently posted Russion investigation tweets database. First of 9 csv files here: <a href="https://raw.githubusercontent.com/fivethirtyeight/russian-troll-tweets/master/IRAhandle_tweets_1.csv" rel="nofollow noreferrer">https://raw.githubusercontent.com/fivethirtyeight/russian-troll-tweets/...
2
1,669
Converting log4j.properties file to log4j2.properties file
<p>I have a log4j.properties file with 2 custom appenders and 2 custom loggers which I need to convert to log4j2.properties file. FileNamePatternRollingFileAppender is an extension of RollingFileAppender. Read the documentation and tried to use some conversion tools but it did not work. How the log4j2.properties file w...
2
1,370
Duplicated rows when I merge 2 data frame
<p>This is Fips data set</p> <pre><code> State Fips State.Abbreviation ANSI.Code GU.Name 1 1 67 AL 2403054 Abbeville 2 1 73 AL 2403063 Adamsville 3 1 117 AL 2403069 Alabaster 4 1 95 AL 2403074 A...
2
3,727
Why isn't this compiling?
<p>I'v created this class here:</p> <p>//Integer rectangle class</p> <pre><code>class AguiRectangle { int x; int y; int width; int height; public: bool isEmpty { return x == 0 &amp;&amp; y == 0 &amp;&amp; width == 0 &amp;&amp; height == 0; } int getTop() { ret...
2
1,680
how to save value dynamically receiving from html form and send to server
<p>I'm trying to create form that send data to servlet. Here im adding some input box dynamically on Click of button. But whenever i enter data and click new "add data" , previous data get lost and it does not appear in input box. Screen shot of form after clicking Add Data<a href="https://i.stack.imgur.com/pRmiN.png" ...
2
2,627
Flutter Syncfusion Calendar doesn't show data
<p>I have a problem with SyncFusion's flutter calendar which is demonstrated by this screenshot <a href="https://i.stack.imgur.com/c3aKL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c3aKL.png" alt="enter image description here" /></a></p> <p>As you see the calendar still get the data from my API b...
2
3,887
osmdroid bonus pack reverse geolocation
<p>I'm trying to find some example about reverse geolocation with osmdroid but can't find any. The same thing happens with osmdroid bonus pack. Can somebody help me please? </p> <p>Here is the logcat info:</p> <pre><code>10-07 12:11:48.340: W/dalvikvm(5543): VFY: rejected Lorg/osmdroid/bonuspack/location/GeocoderNom...
2
1,835
Need help on maven mojo plugin issue
<p>Getting below error-</p> <pre><code>[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:exec (report) on project mtaf: Result of cmd.exe /X /C "java" execution is: '1'. -&gt; [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plu...
2
1,079
Reading NodeJS process.argv in webpack compiled JavaScript
<p>I'm trying to compile a simple TS file with webpack (via 'awesome-typescript-loader') that should read command line arguments.</p> <p>However, I believe the compiled JS is redefining the Node 'process' variable with a closure - making process.argv 'undefined'.</p> <p><strong>TL;DR</strong>: How do I read command l...
2
1,147
Desktop.Action.MAIL encoding subject and body strings correctly for mailto: in URI
<p>I have a question specific to the Java Desktop API in Java 6, more specifically desktop.mail(URI uri)..</p> <p>I was wondering if there is a function one could use to ensure that the Subject and Body in f.ex:</p> <p>mailToURI = new URI("mailto", getToEmails() + "?SUBJECT=" + getEmailSubject() ...
2
1,373
Vpn on demand in ios 9.2
<p>I want to use <code>VPN on Demand</code> feature that is available in <code>Network Extension framework</code>,I want to connect the VPN when the specific URL or site is open in the browser.</p> <p>For Example: when I write <code>www.google.com</code> my VPN will be connected and not on any other sites.</p> <p>Aft...
2
1,296
ggplot2 error: geom_label_repel requires the following missing aesthetics: y
<p>I suspect I am overlooking something very simple here, but this basic process works for me on a bunch of plots, but suddenly not on this one.</p> <p>This code runs just fine:</p> <pre><code>library(ggplot2) library(dplyr) library(tidyr) library(magrittr) library(stringr) library(ggrepel) library(TTR) library(ggforce...
2
1,296
Edit/delete/list in one page
<p>I am trying to make a page with all the information from a database, where a user would be able to edit or delete rows. I don't quite understand how to make the buttons work. I am a beginner in programming, would be really grateful if you could help me.</p> <p>My code:</p> <pre><code>&lt;form action="" method="pos...
2
1,621
How to upload document with metadata to avoid duplicate versioning?
<p>I am upload document to document library along with metadata using server object model in sharepoint foundation 2010. I am using following code</p> <pre><code>// Initialize instance of existing site collection using (SPSite site = new SPSite(siteUrl)) { ...
2
1,441
ArrayList null object reference Android
<p>I get this error:</p> <blockquote> <p>04-30 10:32:26.665: E/AndroidRuntime(13605): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ribicinc.vzemialipusti/com.ribicinc.vzemialipusti.Skatle}: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.uti...
2
1,068
line number spacing in text widget Tkinter
<p>I am adding line number feature to the text widget by following Bryan Oakley's code <a href="https://stackoverflow.com/questions/16369470/tkinter-adding-line-number-to-text-widget/16375233#16375233">here</a>. I am inserting my own XML file in that text box. That file is listed below:</p> <p>myFile.xml</p> <pre><co...
2
2,395
Integer.parseInt() problems
<p>My code is not giving me the right output. It reads numbers from a text file, converts them to an integer value and performs some multiplication on them. But the the products that method <code>findProduct()</code> gives me are wrong, so I think I am using the <code>Integer.parseInt()</code> method incorrectly. </p> ...
2
1,540
Element not visible in firefox as well as chrome
<p>I am working in selenium webdriver 2.0, and I have to automate a script for running functional and cross-browser testing. I am getting an error of <code>element not visible</code> when I am trying to click on an element with the class <code>.divAdvSearchFeildListName&amp;[data-id='30001']</code> for a drop down.</p>...
2
1,883
How to make PHP run faster?
<p>I'm currently trying to import around 20 million rows of data from a textfile to table. The speed of it is far too slow (plus 20 million isn't the full thing).</p> <p>Any ways of actually making the process go faster? BTW i run it from phpmyadmin... </p> <pre><code>&lt;?php //connection to the database $dbhandle...
2
1,138
index and search log files using Lucene - to function as grep?
<p>There are plain txt log files within directory C:\logs. Now we want to index those log files, and then search the index using regex. My code is below. It searched using keyword "Unknown error". But the following code returns "contents: <strong><em>null</em></strong>".</p> <pre><code> System.out.println("contents: "...
2
1,629
How to call cplex .mod and .data from Java
<p>I have an optimization problem modelled and written in IBM ILOG CPLEX Optimization Studio. I want to call .mod and .dat from Java. I found some example to do it. However, I got some error. </p> <p>My code is shown below. I also added all cplex and opl library </p> <pre><code>package cplexJava; import ilog.concer...
2
2,122
TNT Express Connect Pricing module Using PHP
<p>I need to connect to the TNT Expressconnect and get pricing details for given weight and volume of products I am using PHP and try to connect with this lines of codes which is in <a href="https://stackoverflow.com/questions/18719502/php-post-xml-request-to-server-tnt-express-connect-pricing-module?answertab=active">...
2
1,682
How do I independently fade in/out multiple (3+) overlay images over video using FFMPEG?
<p>Using an arbitrary source video, I would like to INDEPENDENTLY fade in/fade out a minimum of three .png overlays/watermarks at various times throughout the video. I'm having trouble getting the syntax right for the filter chain.</p> <p>In these failed attempts below, I'm using four transparent .png images all at 19...
2
1,267
Error 12501 after google sign in on android
<p>I have a class in a library called with JNI throught networkHandler_GoogleSignin that will launch a fragment activity performing the the google sign in. The account selection is well displayed but after selecting the account I have this error 12501 : Status{statusCode=unknown status code: 12501, resolution=null} and...
2
1,649
Fetch API call for each item in a Jinja2 for loop
<p>I'm currently stuck on a personal project where Im making Fetch API calls to get the audio src for a list of html audio tags.</p> <p>The fetch call is triggered by an onclick event on the track. Though regardless of what track i click on, fetch calls /play_track/1/ and appends the audio player to only the first tra...
2
1,588
Flutter retrofit DioError [DioErrorType.other]: Expected a value of type 'List<dynamic>?', but got one of type 'String'
<p>My response json is bellow</p> <pre><code>[ { &quot;cat_id&quot;:&quot;517&quot;, &quot;categoryName&quot;:&quot;Pizza&quot;, &quot;item&quot; : [ { &quot;itemId&quot; : &quot;1&quot;, &quot;name&quot;: &quot;Pizza 1&quot;, &quot;price&quot;: 50 }, { &quot;itemId&quot;:&quot;2&...
2
1,204
Hawt.io login page is not working
<p>I am trying to use Hawtio + Spring Boot + external Tomcat(8.5).But during the execution login page <code>Log in</code> button is not giving any response or error in console.</p> <p><strong>Application.java</strong></p> <pre><code>@SpringBootApplication @EnableHawtio public class Application extends SpringBootServ...
2
3,006
How to display validation errors in CakePHP 3.6?
<p>I'm having trouble displaying the validation errors of a form using a custom validator. The errors does exist as the debug method shows, it just won't be displayed in the form.</p> <p>I'd like to be able to show the error message under (or above, or anywhere) the field.</p> <h1>What I've tried</h1> <p>Well, the <...
2
1,452
Class decorator with generic parameter
<p>I want to write a class decorator that takes a parameter. The trouble is that I want to enforce the type of the parameter to be related to the class itself. </p> <pre class="lang-js prettyprint-override"><code>class Options&lt;T&gt; { accept: (instance: T)=&gt;boolean; } var MyOptions: Options&lt;MyClass&gt;={ ...
2
3,389
weasyprint is not rendering bootstrap4 css correctly
<p>I'm trying to generate an invoice by first designing it as HTML and then feeding that to weasyprint to generate the pdf. I'm using Django 2.2.5 version with bootstrap 4.3.1 and weasyprint 50. The <code>invoice_generator(request)</code> function calls the generate_invoice function with the <code>request</code>, <code...
2
6,862
css horizontal scrolling menu with dropdowns
<p>I am having dropdowns in a menu that has horizontal scrolling on mobile resolution.</p> <p>As you can see in the example the desktop version is able to display the dropdowns when the menu is hovered, however, when using the mobile version that uses <code>overflow-y: hidden</code> the dropdown is obscured.</p> <p>I...
2
2,577
Create deep copy of object
<p>I need help with the deep copying of objects in VB.net. I am aware of the fact that there is a great amount of topics dealing with that, but I was not able to adapt it to my problem. So hopefully someone can explain it to me using my code.</p> <p>The problem: I have designed a class clsParameter which has one name,...
2
1,253
Swift: How to display data from View Controller to Details View Controller
<p>I would like to display particular data from a TableView to Details_View_Controller.</p> <p>I have two labels. One label is a title, and I display this as a title in Details(Conference)_View_Controller.</p> <p>But I have more details to display in Details_V_C. All data I retrieve from Firebase Database. In console...
2
1,244
nginx reverse proxy - only works on /
<p>On my NAS I'm running seafile as an alternative to dropbox/owncloud. I'm using nginx and reverse proxy to serve the webgui using/forcing SSL. Everything for this works fine.</p> <p>Now, I want to set up some other locations for other things running on the NAS (couch potato, plex etc). This is the relevant part of m...
2
1,563
matplotlib: plotting timeseries while skipping over periods without data
<p><strong>tl;dr:</strong> how can I skip over periods where there is no data while plotting timeseries?</p> <hr> <p>I'm running a long calculation and I'd like to monitor its progress. Sometimes I interrupt this calculation. The logs are stored in a huge CSV file which looks like this:</p> <pre><code>2016-01-03T01:...
2
1,089
Alpha color with ShaderMaterial
<p>I am trying to write a shader material for displaying THREE.Points() objects with rounded points. I am doing this by controlling the alpha value in a fragment shader.</p> <p>Below is a fully working version of my code. I am getting the desired effect of only colouring pixels within the circle. Outside, however, I a...
2
1,449
Strange character result in xml by java code
<p>I generate the XML by reading the text form .txt file. But I got strange character results. I want to see my text in xml same as it is shown in .txt file. </p> <p>here is my text from .txt file </p> <p>žena<br> muškarac<br> devojčica<br> dečak<br> automobil<br> autobus<br> drvo<br> kuća<br> avion<br> mačka<br> ...
2
1,285
cascading dropdown in primefaces 3.2 not working
<p>i wish to use cascading dropdown in primefaces 3.2 but its not working. below is my xhtml code:</p> <pre><code>&lt;p:selectOneMenu style="width: 150px" value="#{watchBean.exchange}"&gt; &lt;f:selectItem itemLabel="NSE" itemValue="nse"/&gt; &lt;f:selectItem itemLabel="BSE" ite...
2
1,192
Sending search parameter from activity to google maps api (Android studio)
<p>First of, just gonna say that i'm not the best at explaining (nor at programming), so bear with me.</p> <p><strong>The layout:</strong></p> <p>I have two activities. First one is the main activity where a checkbox and a button are located. the second activity is the google maps api.</p> <p><strong>The progress:</...
2
1,426
jQuery - creating dynamic tables
<p>The following code works, in so much that it creates the table and appends the rows. </p> <p>However, I've attached a click event to the dynamically created button that resides in <code>&lt;tfoot&gt;</code> and it doesn't work. It doesn't seem to call the <code>createNewIssue</code> function and it doesn't genera...
2
1,129
MVC 5/ReportViewer/ASP.NET client-side AJAX errors
<p>I'm at wits end. I'm trying to load up a ReportViewer with both valid aspx code and ReportViewerForMVC code wind up here. First, the error spread:</p> <blockquote> <p>Uncaught SyntaxError: Unexpected token &lt; WebResource.axd:1 </p> <p>Uncaught SyntaxError: Unexpected token &lt; GetSysWideQuizReport:67 </p>...
2
2,232
How to test Symfony FOSRestBundle routes by using Postman. How to configure FOSRestBundle
<p>Good day. Git <a href="https://bitbucket.org/fonjeekay/resttest/src/fe118b493c01b70c570a6997db100e4eb4d36358/project2/?at=master" rel="nofollow noreferrer">repository</a>. I have next routes but i can't get results of this routes. <code>php console debug:route</code></p> <pre><code>_wdt ANY ...
2
1,518
How to shift tabs with a CupertinoTabBar ? Unlike the material tab bar we do not have tab controller to switch tabs
<p>I'm on the home tab and I need to shift to my second tab with the CupertinoTabBar. I do not have tabcontroller to shift with a global key like the material tab bar. Can you please suggest options ? </p> <p>I have tried using a global key and changing the currentIndex of the tab. However, no luck. Have ran out of op...
2
2,121
Check if a PHP-based SOAP server is FULLY woking
<p>I have a SOAP-Server problem driving me nuts from a couple of days. I have a very simple SOAP-Client PHP script interrogating a simple SOAP-Server PHP script as well.</p> <p>I have an exact copy of these scripts on my debug server and they work perfecly (it's just a hello World function) but on production seems the...
2
1,925
Is ternary search less efficient than this related algorithm?
<p>The <strong><a href="http://en.wikipedia.org/wiki/Ternary_search" rel="nofollow">ternary search</a></strong> algorithm is a fast algorithm for finding the minimum or maximum of a <strong><a href="http://en.wikipedia.org/wiki/Unimodal_function#Unimodal_function" rel="nofollow">unimodal function</a></strong>, a functi...
2
1,344
Regular Expressions kicking out HTML textarea input in PHP preg_match if condition
<p>I am at a loss on why my PHP code, the preg_match, is not accepting input from an HTML textarea input when it has parentheses or returns:</p> <p>Here is the relevant PHP:</p> <pre><code>/* Check for Ingredient Description */ if (preg_match ('%^\s*[A-Za-z0-9\,\.\' \-\"\(\)]{30,2048}$%', stripslashes(trim($_POST['in...
2
1,190
How to accept an array parameter in a GET request in Flask using Connexion
<p>I am using connexion to create a REST API via Flask. At the moment I am passing a single identifier in.</p> <pre><code>/read/maa_valid_product_id/{drug_product_id}: get: operationId: registrations.read_maa_valid_product_id tags: - Marketing Applications summary: Read the entire list of...
2
2,661
discord.js Cannot read property 'execute' of undefined
<p>I get this error:</p> <pre><code>botcommandsmoney.get('auction').run(bot, message, args, err, auctionhouse) ^ TypeError: Cannot read property 'run' of undefined </code></pre> <p>My code in index.js (start file) is this:</p> <pre class="lang-js prettyprint-override"><code>/...
2
4,329
How to convert a Base64 string to Bitmap on Android?
<p>I'm having this problem for converting several Base64 string to Bitmap images, in my android application. Now I've looked for solutions for quite a while, but nothing seems to solve my problem. My application gets JSON data from a server, containing several images in base64. the json code received from the server c...
2
2,772
Error '1004': Unable to set the Visible property of the PivotItem class
<p>i got the below code from here: <a href="https://stackoverflow.com/questions/14387938/looping-through-report-filters-to-change-visibility-doesnt-work">Looping through report filters to change visibility doesn&#39;t work</a> where the solution is marked as working. After modifying according to my need, it is like thi...
2
1,076
Docker: Jenkins-jdk11 fails to connect to Nexus due to JAXB-API has not been found
<p>Get the following error while trying to connect <code>jenkins-jdk11</code> to <code>nexus3</code> containers running same network in docker-compose on JDK8 based host system. Afer clicking "Test Connection" <a href="https://i.stack.imgur.com/PjWSD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Pj...
2
1,102
Hashicorp Packer won't execute packer-provisioner-shell on Windows host
<p>This is my 1st question. I attempted to follow all of the guidelines.</p> <p>I am attempting to use Packer to create a Vagrant image of Debian 8. If I run a packer build with only the "builders" template it will execute successfully and a Virtualbox image will be produced. When I attempted to add the "provisioners"...
2
1,560
Sending bulk of data from one activity to another activity?
<p>Friends i have 2 text boxes... user have to fill all the text boxes and then press the submit button. On pressing submit button new activity should start and all the filled information should be displayed over there. I have tried it using intent but the second activity showing only content of one textbox. please tel...
2
1,231
PyQt / Qt Designer - Extra parameters for promoted widget without a plugin
<p>Let's say I have a custom PyQt widget that I want to use in Qt Designer, such as for a matplotlib canvas:</p> <p><strong>plot_widget.py:</strong></p> <pre><code>from PyQt5 import QtWidgets import matplotlib matplotlib.use('Qt5Agg') from matplotlib.backends.backend_qt5agg import ( FigureCanvasQTAgg, NavigationT...
2
1,769
Why does audit logging using Hibernate Interceptor hang at SocketInputStream.socketRead0?
<p>This is baffling to me. I have searched numerous forums for clues. In the postFlush method, I open a new hibernate (v. 3.3 - also tried v.3.5) session using a distinct session factory. I use c3p0 v. 0.9 for connection pooling. I start a new transaction, save the auditLog object, and commit the transaction. This...
2
4,374
Getting randomly error of org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
<p>Hi i am getting this JsonException sometimes... why this happen can any body solve this problem below is my code.</p> <pre><code> public int getResult(String name, double lat, double lon) { try { HttpClient httpclient = new DefaultHttpClient(); String query = URLEncoder.encode(name,...
2
1,434
Object Reference exception when starting NServicebus endpoint
<p>I have an NServicebus project that I cannot start after upgrading from 2.6 to 3.2.7 The endpoint look like this:</p> <pre class="lang-cs prettyprint-override"><code>namespace Customer.Project.SchemaImportService { public class SchemaImportEndpoint : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization ...
2
1,811
iOS swift notficiation after download finishes using URLSession
<p>I am downloading a long file using URLSession and after the download is finished i am trying to show a notification to the user to let him know that the download is completed. </p> <p>Notification works perfectly when the app is running. But not working when the app goes background. When the app comes to foreground...
2
2,414
Run a Crystal report from C# passing parameters without using a Viewer
<p>I am writing a "proof-of-concept" console app to test calling and retrieving Crystal Reports. I don't want to use a ReportViewer and instead what to retrieve reports via a stream. I am using the CRforVS redist libraries CrystalDecisions.CrystalReports.Engine and CrystalDecisions.Shared. My code is shown below:</p> ...
2
1,132
Creating expandable chat text input with maximum height with no JS
<p>I'm trying to implement the following design (For now I'm just worried about the text box):</p> <p><a href="https://i.stack.imgur.com/g7CwN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g7CwN.png" alt="enter image description here"></a></p> <p><strong>When typing:</strong> <a href="https://i.s...
2
1,170
The database connection must be open to store files at GridFSStorage._handleFile
<p>I try to upload a file on local MongoDB server via a web application in the following:</p> <pre><code>const express = require("express"); const bodyParser = require('body-parser'); const path = require('path'); const crypto = require('crypto'); const mongoose = require('mongoose'); const GridFsStorage = require('mu...
2
1,341
SpringMVC app... why are app contexts being initialized twice?
<p>I've seen this basic question asked on these forums before, but none of the answers seem to solve my particular issue. Anyway, I have a small Spring webapp, consisting of a core Spring business layer, SpringMVC, and Spring-Quartz (I am also using MyBatis, although I don't believe that's relevant). All of my Spring l...
2
1,878
Using java google app engine bulkloader.yaml to upload data with export_transform on __key__ changes ID/NAME coloumn from id (long) to name (string)
<p>I think my question is similar to: <a href="https://stackoverflow.com/questions/3749806/bulkloader-export-transform">BulkLoader -export_transform</a> OR <a href="https://stackoverflow.com/questions/3220911/gae-datastore-export-transform">https://stackoverflow.com/questions/3220911/gae-datastore-export-transform</a><...
2
2,019
Return Spring Batch Job ID before the job completes
<ul> <li><p>I'm trying to return a Spring Batch Job ID before the job completes.</p></li> <li><p>My current implementation only returns the information once the job completes.</p></li> <li><p>I use a batch program controller and a batch service, posted below. Thanks, I'm new to Spring Batch and after exhaustive searchi...
2
1,647
How to clear all items in a ListView while using List Adapter onTextChange?
<p>I have been trying to find answers, but it has been hard to find a solution that works. </p> <p>I tried setting the adapter to null, clearing the actual list but neither seems to work.</p> <p>I am using a ListView with a ListAdapter and am trying to make it clear on a change of search Text when text is changed.</p...
2
5,891
using @cache_response() decorator from drf extensions while using @api_view function view
<p>I want to cache my API responses. I am using <code>Django Rest Framework</code> and want use for this purpose <code>@cache_response()</code> decorator from <code>drf extensions</code>.</p> <p>I am following examples from: <a href="http://chibisov.github.io/drf-extensions/docs/#cache-response" rel="nofollow">http://...
2
1,107
How to jump to anchor on submit - not to top of page
<p>On this page I have a pregnancy calculator script: <a href="http://taranakimidwife.co.nz/index.php" rel="nofollow">http://taranakimidwife.co.nz/index.php</a>? ... Itemid=104</p> <p>At present, calculate is press the page jumps back to the top. I want it to go to an the anchor #pregcalc. Know what I mean? This is th...
2
1,839
I want to convert raw html to pdf using pdflayer
<p>I'm sorry I'm not good English.</p> <p>I want to convert html to pdf. so I using 'pdflayer'.<br> I write blow this code. but doesn't work.<br> I expect 'hello world' in pdf.<br> but pdf is white paper. not show 'hello world'.<br> What's wrong??</p> <pre><code>var request = require('request'); var fs = require('fs'...
2
5,192
Readout Tag from which the TimePicker called
<p>I have 2 TextViews from which I can call a time picker. But Im not able to figure out from which TextBox I callt the time Picker. Following is the code snippset from the Activity:</p> <pre><code>case R.id.tv_to_night: // show the time picker dialog TimePickerFragment newFragmentNight = new TimePickerFragm...
2
1,082
android - Get location and send data to remote server ONLY while condition is true
<p>I am building an app that needs to send the user's location to a remote server (Pusher in this case). The goal is to update their location on a map in near real-time but <strong>only</strong> when they are on a job, otherwise the app will not need to track their location.</p> <p>I need the location updates to remai...
2
4,998
Redirect page after site login with facebook
<p>I am getting problem to redirect page after website login with facebook. <br> 1. On click of facebook login button from site it redirect to facebook login page<br> 2. User get authenticate but it is not redirecting to next page given in <code>headrer('');</code><br> 3. If i refresh same page then it redirect to give...
2
1,243
Clear Edittext onclick issues
<p>I'm kind of new to android programming and I've been searching for an answer to this for hours. I'm trying to get an <code>EditText</code> cleared when someone clicks on it, but for some reason eclipse isn't recognizing the <code>onClickListener</code>. What did I miss?</p> <pre><code> public class PillbugsStart...
2
1,116
How to configure intellij idea to use hibernate persistence tools and reading mapping files from external jar files
<p>Assume that i have this below <code>hibernate.cfg.xml</code> file that contains data source configuration and path to jar files that contains <code>.hbm.xml</code> mappings:</p> <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt; &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration ...
2
1,081
Specify response.request.responseURL in moxios
<p>I'm currently trying to write some functionality that requires the <code>response.request.responseURL</code> value to be set when axios handles the response. However, I can't seem to set this value with moxios. Here's what my test looks like:</p> <pre><code>it('resets list selection if input contents were replaced'...
2
1,224
can't play mp3 file via javafx 2.2 media player
<p>I'm developing what I thought should ahve been a simple task with javafx- media player that will play mp3 files stored on the local hard drive, in users default music folder path (using fedora). I can play all the mp3 files fine from the command line, but when I try and play via javafx.scene.media libraries, javafx ...
2
3,589
How to create a tree array from a flat array of objects, then number each tree node's level and sort nodes at each level?
<p><strong>Note: Solution below!</strong> </p> <p><strong>The Problem:</strong> I needed code to turn a flat array of objects with id and parent values into a tree. The number of levels deep is unknown, since the flat array is generated dynamically.</p> <p>Also, once the items are in a tree, I needed nodes to be assi...
2
2,392
Error converting bytecode to dex: Multiple dex files, Android Studio 3.0
<p>I recently upgraded to Android Studio 3.0, and while running the program I get the following error:</p> <pre><code>Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/vuforia/TransformModel; Error:com.android.dex.DexException: Multiple dex files define Lcom/vu...
2
2,409
Setting Navigation bar back button Image for entire application in swift
<p>I am setting navigation bar back button in <code>AddDelegate</code> but it is not setting properly.</p> <p>I have tried below code :</p> <pre><code>let backButtonImage = backImage?.withRenderingMode(.alwaysOriginal).resizableImage(withCapInsets: UIEdgeInsetsMake((backImage?.size.height)!, (backImage?.size.width)!,...
2
1,843
what are the drawnbacks and risks replacing default SimpleAsyncTaskExecutor by own Executor
<p>Personal knowlegedment: I read from <a href="https://www.javacodegeeks.com/2020/01/send-your-data-async-on-kafka.html" rel="nofollow noreferrer">javacodegeeks</a>: "... SimpleAsyncTaskExecutor is ok for toy projects but for anything larger than that it’s a bit risky since it does not limit concurrent threads and doe...
2
1,350
Google Apps Script: Automated reporting with Google Analytics
<p>I am trying to automate some custom Google Analytics reports with Google Apps Script and output the data into a Google docs spreadsheet. I followed a tutorial and got it working with the following code:</p> <pre><code> function runDemo() { try { var firstProfile = getFirstProfile(); var results = getR...
2
3,174
Installing or upgrading version of cURL
<p>I am trying to update curl package on Centos 6.6. Currently it is installed version 7.19. I created new repo file:</p> <pre><code>[CityFan] name=City Fan Repo baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/ enabled=1 gpgcheck=0 </code></pre> <p>And after that</p> <pre><code>yum clean all </code...
2
1,190
Making navigation available to all components in React Native app
<p>I'm using <code>React Navigation 5</code> in my <code>React Native</code> app and I'm not exactly clear about how to make navigation available to all components. I also want to mention that my app uses <code>Redux</code> for state management but I didn't integrate <code>React Navigation</code> with <code>Redux</code...
2
1,140
WINAPI: capture mouse click in a ListBox for adding new items
<p>I have a Windows application with a ListBox inside a Dialog.<br> What I want to do is to get a notification when the user <strong>clicks in an empty area of the listbox</strong> and then <strong>add an item</strong> that I would get from a new dialog.<br> How can this be done?<br> Thanks in advance for your help!<br...
2
1,088
C++ SendInput not letting go off the key
<p>I use these codes below, they keep holding both the left and right keys and never let go off them until I press those keys myself.</p> <p>I could run the left key code and keep pressing the right key.. and it will keep pressing the left key.. only until I press the left key myself will it stop.<br></p> <p>Same thi...
2
1,249
WP8 working with XML and LongListSelector
<p>I'm trying to make a LongListSelector from xml file data.</p> <pre><code>public MainPage() { InitializeComponent(); XDocument loadedData = XDocument.Load("/Resources/EuroTrip.xml"); var data = from query in loadedData.Descendants("country") select new Country ...
2
1,802
There are delayed insert actions beforeQuery operation as cascade level 0
<p>I am trying a functionality which will read data from an excel sheet and save them into database. This is done to import large amount of data. However I am getting this weird error while inserting data using Spring data JPA. I have no clue why this error is occurring and what it refers to! Here's the stack trace.</p...
2
6,703
RCP application run from Eclipse runs fine, exporting it throws InjectionExceptions
<p>I'm trying to execute my RCP application I recently moved from eclipse Indigo to Photon. After changing/updating the required libraries, I have managed to run the application without problems launching the product as an Eclipse application (from the Eclipse IDE).</p> <p>However, when I export the product to a nativ...
2
1,780
How to show correctly tabulation in xsl-fo?
<p>I have an XML document and I am creating an XSL-FO file to convert it to pdf with apache-fop.</p> <p>In the xml, there are sections &lt;code> to show... code.</p> <p>In the xsl-fo, I added the white-space="pre" sentence to preserve the code format, but tabulations are shown like single space:</p> <p>XML section:<...
2
1,604
How to clean up after CREATE DIALOG CONVERSATION on disconnect?
<p>---Edited to include more and better details---</p> <p>In SQL Server, you can initialize a conversation on a queue:</p> <p><a href="https://msdn.microsoft.com/en-us/library/ms187377.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/ms187377.aspx</a></p> <p>Multiple processes will all initia...
2
1,105
OpenCV C++ code to Java Language "Simple Shape Detection App"
<p>I am quite new to OpenCV. I'm trying to learn how to convert a given C++ OpenCV code into its Java equivalent.</p> <p>The Original Code of the below "Java translated" code is from <a href="https://github.com/bsdnoobz/opencv-code/blob/master/shape-detect.cpp" rel="nofollow noreferrer">(GitHub) Shape Detection Algori...
2
5,564
Populate a listView from string resources in Android
<p>I am trying to populate a listview from the string resources defined in the string XML file in Android. I am not getting any errors but when I run the application it asks me to force close. I am getting the following error in log cat manager 03-26 01:04:42.903: E/dalvikvm(205): Unable to open stack trace file ...
2
1,308
AutoCompleteTextView doesn't show suggestions in Android 2.3.5
<p>I'm using a special autocompletetextview for suggestions of thousands of streets. Due to this huge element list, I have to clear and populate the Adapter on the fly depending on the first input letter. For example, when the user enters "b", the Adapter is being populated with all streets beginning with "b". This wor...
2
3,158
"Error: not found: java" when running webdriver.io test
<p>I'm trying to run a <a href="https://github.com/DEFRA/rod-licensing-tests/tree/master/packages/frontend-acceptance-tests" rel="nofollow noreferrer">webdriver.io test suite</a> from the VS Code debugger but it is failing with the error message:</p> <pre><code>ERROR @wdio/cli:utils: A service failed in the 'onPrepare'...
2
1,197
Smooth Drawing with Apple Pencil - some points out of order
<p>Following this Answer, I have implemented a CanvasView to draw with the Apple Pencil: <a href="https://stackoverflow.com/a/34583708/2529173">https://stackoverflow.com/a/34583708/2529173</a></p> <pre><code>import Foundation import UIKit class CanvasView: UIView { var points: [CGPoint]? var path: UIBezierPa...
2
4,725
how to show TextView changes to notification in android?
<p>I have a TextView in my app and want to show its value in Notification. as you see below Textview shows times of media playing. when pauseBTN clicked, notification shows the times contentiously. </p> <p>but notification just show one number that minimize button clicked. how can I change it? </p> <p>my Activity cla...
2
1,737
Why are my INFO logs still getting logged when level off?
<p>I just realized today we were using log4j2 and my log4j properties file wasn't being utilized. So I dropped in the most basic of log4j2.xml files to verify it's being used. I'd expect to see none of my logs with it off, but instead see all. Can anyone point out to me why the level set is not being honored?</p> <p>H...
2
3,632