title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Core-bluetooth peripheral doesn't notify the central when data is updated
<p>I'm trying to send big packets of data via BLE. To do this I've created a characteristic that should notify the central when it's data change. The problem is that apparently the peripheral stacks up the data in the characteristic, but obviously once the characteristic reach 552 bytes it can not stocks more data.</p>...
2
1,434
Speeding up CUDA atomics calculation for many bins/few bins
<p>I am trying to optimize my histogram calculations in CUDA. It gives me an excellent speedup over corresponding OpenMP CPU calculation. However, I suspect (in keeping with intuition) that most of the pixels fall into a few buckets. For argument's sake, assume that we have 256 pixels falling into let us say, two bucke...
2
2,197
Custom dialog interface for multiple Activities/ Fragments
<p>I am new to android studio and I am trying implement a dialogfragment to pop up whenever a button is clicked or a toolbar action_add button is clicked. It sends data from the dialog box to a fragment or an activity (trying to understand how it works for both). My dialog class has an interface, which worked great whe...
2
2,591
No attributes auto-complete in Netbeans after register the custom component in .taglib.xml
<p>I create a custom component for <code>SelectOneRadio</code>, and I register it in <code>xyz.taglib.xml</code> and so far it works. The only problem is that my NetBeans cannot see my tag attribute in auto-complete. For example, if I have <code>layout="pageDirection"</code> in my custom component, then it render corre...
2
1,811
Why page number is not enabled correctly in listview and datapager
<p>I am using listview and datapager for display. I use two level of listview, where inner listview item can be 6 types. I use my own datasource. I only need to display 1 inner listviewitem per page. It display each page correctly, but page number is not set right, eg, when 2nd page (other as well) is click, 2nd page n...
2
5,263
How to select different inputs for a date range selection in react
<p>I'm using a simple create-react-app and react-calendar-pane (<a href="https://github.com/brillout/awesome-react-components" rel="nofollow noreferrer">https://github.com/brillout/awesome-react-components</a>) to develop a simple date range selector for a calendar from scratch.</p> <p>The calendar is being called as ...
2
1,047
getdate() performance issue sql server 2000
<p>I have a table with fallowing columns</p> <pre><code>symbol |market| bid_price | ask_price | update_time ------- ------ ----------- ----------- ------------ ABC US 123.00 675.00 20012-09-10 4:24:32.986 CDE SG 456.00 545.00 20012-09-10 4:26:32.986 </code></pre> <p>And m...
2
3,013
json-parsing errors at run time
<p>I am trying to send some sign up information to a php server from my <em>Android</em> app. </p> <p>I have two classes: <strong><em>RegisterActivity</em></strong> and <strong><em>JSONParser</em></strong>. While I'm trying to run this programs there is some errors like this:</p> <p><code>Error parsing data org.json...
2
3,391
Bootstrap Jquery Search filter for card-columns field
<p>How do i filter the results based on <code>card-title</code> ? </p> <p>Quick Look at : <a href="https://codepen.io/anon/pen/zyqemK" rel="nofollow noreferrer">https://codepen.io/anon/pen/zyqemK</a></p> <p>JQUERY:</p> <pre><code>$(document).ready(function(){ $("#myInput").on("keyup", function() { &lt;NEED H...
2
4,990
Object of type 'NoneType' has no len() error
<p>What I want is to count the occurrence of a specific word on goole first page result site, and then once again count for another word - if this word appears more than 2 times, then I will change the occurrence of the first word to 0. But I get this error:</p> <p>File "D:\HQ_Bot-master\answer_bot.py", line 307, in ...
2
1,370
How to change the width of NormalPeoplePicker dropdown
<p>I'm using default example of NormalPeoplePicker from <a href="https://developer.microsoft.com/en-us/fluentui#/controls/web/peoplepicker#IPeoplePickerProps" rel="nofollow noreferrer">https://developer.microsoft.com/en-us/fluentui#/controls/web/peoplepicker#IPeoplePickerProps</a>. When the dropdown displays it cuts of...
2
2,594
Draw triangle with Qt3D
<p>I need to draw a polygon with Qt3D, but i found how i can do this with triangles. So. I found a code, that works more tightly with OpenGL from Qt3D. It was drawing the line but i changed one to draw triangles. When i set <code>setPrimitiveType(Qt3DRender::QGeometryRenderer::TriangleStrip);</code>, then it works. But...
2
1,592
Python - Splitting multiple columns by delimiter
<p>Note: I'm a beginner with Python and just started using Pandas a couple days ago. I have a background in R.</p> <p>I'm trying to split a pandas DataFrame, but can only seem to split one column at a time by one delimiter at a time.</p> <p>My data looks like this:</p> <pre><code> 0 ...
2
1,090
Video rotating to left by 90 degree when converted using ffmpeg
<p>I developed a below code:</p> <pre><code>extern "C" { #include &lt;libavutil/imgutils.h&gt; #include &lt;libavutil/opt.h&gt; #include &lt;libavcodec/avcodec.h&gt; #include &lt;libavutil/mathematics.h&gt; #include &lt;libavutil/samplefmt.h&gt; #include &lt;libavutil/timestamp.h&gt; #include &lt;libavformat/avformat....
2
6,837
why this is not working - Unit testing a synchronous method using parameterized data of Junit?
<p>I am trying to learn the JUnit and wanted to extend it to test in a multi-threaded way.<br></p> <p>The class I want to test is PrimeNumberValidator. This just tests if a passed in number is prime or not. <br></p> <pre><code>package com; public class PrimeNumberValidator { public Boolean validate(final Integer...
2
2,181
ajax in Thymeleaf SpringMVC?
<p>How to get fragment in main page using AJAX in Thymeleaf SpringMVC?</p> <p>I am having Spring MVC and Thymeleaf templating engine. I'm a beginner in Thymeleaf.</p> <p>I was wondering how can i use ajax to get part of website on how to do simple Ajax request to controller and in result rendering only a part of a te...
2
1,692
extract value from url using react router
<p>I have a URL link and I want to extract the value from that URL I am using react-router to access the value and here is the link of URL &lt;test/?salesoff=S4&amp;salesdist=District%201&amp;custname=C2&amp;product=P2&amp;productgroup=PG-1&gt; so using that URL I want to access each value and pass to data in the form ...
2
1,946
Split div's content in two columns with Javascript
<p>I'm trying to find a way to split the content of one div and split it into two columns by following a logic process. </p> <p>With a logic process, I mean that I'd like to split the content more or less in a half but without breaking the last sentence of the first column for example. </p> <p>So I'd like to let fini...
2
1,083
How stop richfaces style?
<p>I develop this contact form:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:ri...
2
2,132
Plink returning unwanted characters via C#
<p>I am getting unwanted characters before and after my results when using Plink via C#:</p> <p>Command:</p> <pre class="lang-none prettyprint-override"><code>ls -l */informatica/tgtdynamicparams*.out | grep vaulttest| grep 'Sep 1'|awk '{print $9}' | sort </code></pre> <p>Linux result:</p> <pre class="lang-none pr...
2
1,696
Java: While loop does not exit
<p>Does any one have any idea why this while look ONLY exits IF theres a System.out.println()?</p> <p>The very same code doesn't work if I comment out the println()</p> <pre><code>do{ System.out.println(""); if(hasWon()){ InOut.out(output() + "\nYou Won"); System.exit(0); } } while (!has...
2
1,097
Scaling heat map using geom_tile and ggplot
<p>I am trying to create a heat map using ggplot. I am using the following code: </p> <pre><code>ggplot(ff, aes(x=Days, y=variable)) + geom_tile(aes(fill=value),colour="blue") + scale_fill_gradient(limits=c(-1,1),low="blue",high="red",na.value="white") </code></pre> <p>Here are my questions: </p> <ol> <li>How d...
2
8,858
Error in my mp3 splitter program?
<p>So, I made a program that splits a .mp3 file in Java. Basically, it works fine on some files but on some, the first split file encounters an error after playing some part. The other files work completely fine though.</p> <p>I think it has something to do with how a file cannot be a multiple of the size of my array ...
2
1,258
Android Java - Unable to destroy activity: IndexOutOfBoundsException
<p>I am getting the following error whenever I close my application: </p> <pre><code>FATAL EXCEPTION: main Process: uk.cal.codename.projectnedry, PID: 24450 java.lang.RuntimeException: Unable to destroy activity {uk.cal.codename.projectnedry/uk.CompanyScope.CompanyNavigationActivity.CompanyNavigationActivity}: jav...
2
1,815
Set UpdateSourceTrigger to Explicit for WPF ListBox Item Source Controls using MVVM C#
<p>I'm having a Collection of type Employee Model Class. It has two properties empName and isChecked.</p> <blockquote> <p><strong>Expectation</strong> : I need to update the property isChecked from the Checkbox, while on Clicking the Apply Button. Otherwise it don't need to update the Property.</p> </blockquote>...
2
1,088
Vagrant: running Ansible provisioning after all VMs booted, Ansible cannot connect to all hosts
<p>I'm trying to figure out how to use Ansible with Vagrant the proper way. By default, it seems Vagrant is isolating Ansible execution per box and executes playbooks after each box partially as it applies to that single box in the loop. I find this VERY counterproductive and I have tried tricking Vagrant into executin...
2
2,936
curl_easy_perform segmentation fault on Linux
<p>I am working on a c++ app which uses curl in order to an HTTP GET request. It works perfectly fine on Windows but on Linux (CentOS 7) I get a segmentation fault when curl_easy_cleanup is used. </p> <p>Below is my code</p> <pre><code>CURL* curl = NULL; curl = curl_easy_init(); if (curl == NULL) { ...
2
2,741
ASP.NET MVC JQuery UI TAB - How to make post-back on each tab click. How to make it SEO friendy?
<p>I am using jquery tab as given bellow. Clicking on each tab it make a AJAX call according to its href url. Problem is AJAX call is not SEO friendly. How i can make it SEO friendly? How to do a postback on each tab click and keep current tab as selected after postback. Also how to update url on each tab click i mean ...
2
1,441
Trouble with placing and formatting dates in ggplot2 graph using chron
<p>I've been trying to add appropriate dates on the x-axis of my graph, but can't figure out how to do it in a sane way. What I want is pretty simple: a date at every January 1st in between the minimum and maximum of my data set.</p> <p>I don't want to include the month - just '2008' or '2009' or whatever is fine. A g...
2
1,244
Troubleshooting Rstan error "running command...had status 1"
<p>I am getting an Rstan error that I don't understand and this particular error hasn't been addressed in the previous Stack Overflow questions.</p> <p>The R code to call Rstan is</p> <pre><code> # Fit the model start = Sys.time() pvl_d_fit &lt;- stan(file = 'pvl_d.stan', data = pvl_d_dat, v...
2
3,283
Laravel relationship through an array of JSON objects
<p><strong>Models:</strong></p> <blockquote> <p><strong>User</strong> which <em>hasMany</em> <strong>groups</strong>, and <em>hasMany</em> <strong>roles</strong> <em>through</em> <strong>group</strong></p> </blockquote> <p>and</p> <blockquote> <p><strong>Group</strong> which <em>hasMany</em> <strong>users</stron...
2
1,183
Taking input and updating a div tag using javascript and html
<p>Ok so I have to make a basic javascript file that takes data from two input fields and then updates the div tag with the relevant new values when a button is clicked. This is the first thing I have ever done in JS, so excuse any bad practices. I have 3 buttons, the first two save and update only the name or the age ...
2
1,034
Selecting Music Folder html
<p>I would like to be able to select a music folder and shuffle all of the songs once on load and Have a skip button + return the song file name to the visualizer so that It can visualize each song. I'm still learning array's and for loops so I'm unsure of how to go about this. I also want to keep away from extra libra...
2
1,062
Kubernetes: Unable to mount volumes for pod
<p>I have been following this guide - <a href="https://cloud.google.com/sql/docs/postgres/connect-kubernetes-engine" rel="nofollow noreferrer">Connecting from Kubernetes Engine</a></p> <p>And having an errors after all:</p> <pre><code>$ kubectl describe pod | grep Warning Warning FailedMount 4m (x15 ove...
2
1,802
jquery, set image as foreground image - watermark effect across all page content
<p>I am trying to use jQuery to set a new class on the content id that wraps around my page content to create a watermark effect using a transparent image. This is to run alongside a drop down box that can be removed that will inform the user the site is archived. The drop down box works and can be removed when clicke...
2
1,764
Can't seem to print an arraylist full of objects/enums
<p>I was trying to create a card game golf for fun and to practice my java skills. I'm trying to use enums for my card values and suites. Those values are held in a constructor, named Card, in the Card Class. </p> <p>The problem I'm running into to is printing my arraylist Deck that holds all my individual cards. ...
2
2,274
Expand/Collapse Shiny selectInput function
<p>I would like to find a resource that would allow my Shiny selectInput function to expand/collapse based on the category headings that I have created. I have searched through some bootstrap resources, but am not yet successful. Please forgive my minimal working example, I acknowledge that there may be more efficient ...
2
1,167
Time Parse Error in d3.js?
<p>I'm trying to run a basic d3.js line graph but I keep getting an error in the function <code>d3_time_parse</code>. The example I'm attempting to copy is here: <a href="http://bl.ocks.org/d3noob/b3ff6ae1c120eea654b5" rel="nofollow">http://bl.ocks.org/d3noob/b3ff6ae1c120eea654b5</a></p> <p>Specifically, the error is ...
2
1,583
HTML5, Easel.js game problems
<p>Been working on an easel game tutorial that involves an animated character going across the screen and avoiding crates falling from above. I've followed the code in the tutorial exactly but no joy;nothing seems to be loading (including images which are mapped correctly). No errors regarding syntax seem to occur so n...
2
3,761
scrapy Redirect 302
<p>i am just crawl to a websit.but redirecting anthor page. in spider i added </p> <blockquote> <p>handle_httpstatus_list = [302,301]</p> </blockquote> <p>and overwrite the <code>start_requests</code> method. but problem is </p> <pre><code>AttributeError: 'Response' object has no attribute 'xpath' </code></pre> <...
2
4,049
RuntimeException if minifyEnabled is true with ViewModel class
<p>If <code>minifyEnabled</code> is <code>false</code> everything works fine. But after I change my <code>minifyEnabled</code> to <code>true</code> runtime exception happens:</p> <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{.ui.main.MainActivity}: java.lang.RuntimeException: Cannot cre...
2
5,400
Highcharts 'Cannot read property tooltipOptions of null'
<p>If have the following highchart:</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>statisticsChart = new Highcharts.Chart({ chart: { renderTo: 'advertisements-graphic-chart', type: 'line' }, title: {...
2
1,131
how to validate my form field after my check box is checked?
<p>i have created one form with dynamically created fields. and i have a one check box with unique ID . when user clicks that check box then only those two fields are visible ("name and age"). after clicking only "age" field need to be validate . </p> <p>here is my code :</p> <pre><code>$(document).ready(function...
2
1,920
How to pass date id from one jsp to another jsp page
<p>I am calculating the price of a ticket with discount on weekdays and weekends based on the time duration.So, i gave inputs of duration and date using datepicker plugin which is in Above Page. For this i am getting proper result.But i have to create two different jsp pages(date.jsp and cal.jsp). In 1st jsp page(dat...
2
2,385
SPLoaderError.loadComponentError: Failed to load component
<p>Developed a SharePoint app in SPFX Framework, when I compile it with gulp build it compiles fine, however when I do gulp serve and I add the app to the workbench and get this following error:</p> <blockquote> <p>[SPLoaderError.loadComponentError]:***Failed to load component "6d68696e-6767-4686-9cd4-60788de11f47" ...
2
1,335
Why does Nginx Provide the Client SSL DN in reverse order?
<p>I'm curious why some web servers (eg. Nginx) provides the Client SSL DN in reverse order.</p> <p>A web app is posting the DN to a Java Web Service, which is attempting to create a Java <a href="http://docs.oracle.com/javase/7/docs/api/javax/naming/ldap/LdapName.html?is-external=true" rel="nofollow noreferrer">javax...
2
1,643
How does zindex work in android, how can I change the order later
<p>I have an XML Layout with imageButton and I want add "later" some imageButtons programmatically. Unfortunetly the added buttons cover the XML button. How can I use the zindex? Zindex attribute doesn't exist. I want @+id/btn_surface upper.</p> <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/r...
2
1,778
Initialize VueJs after opening new tab
<p>At the moment I use php to collect data needs to be printed in one pdf and open pdf in new browser tab. The problem is that it generate to much traffic as soon as I've a lot of users and a lot of docs to be printed in a same time. So I'm looking for a way to collect everything in one html, open it in new tab, fill w...
2
1,197
MySQL: Update a running "account balance" based on another table
<p><strong>Fiddle:</strong> Please see this SQLFiddle: <a href="http://sqlfiddle.com/#!9/af05d8/1/0" rel="nofollow noreferrer">http://sqlfiddle.com/#!9/af05d8/1/0</a></p> <p><strong>Scenario:</strong> I need to update customer account balances based on a table listing the jobs/services received. Each customer account ...
2
2,410
gsoap class generation problem
<p>I am trying to generate gsoap classes for the JIRA issue tracking system WSDL. I run these commands to generate the required classes:</p> <pre>$ wsdl2h -o JIRASoap.h &lt;url to wsdl&gt; $ soapcpp2 -C JIRASoap.h</pre> <p>The soapcpp2 command gives the following output, but does not indicate how to fix it.</p> <pr...
2
1,218
How can i get this Json to Fill my dropdown in MVC?
<p>The Goal is User types inputs an id the id get processed using StringFormat. Then compared to the database the return result returns all matches. So I have it returned in a JSON. I want to pull out the First and Last name and fill the Dropdown with it that infomation </p> <p>This is my viewmodel using System;...
2
1,273
Calling a Dialog from a ComboBox in a QStyledItemDelegate
<p>So what I have here is my delegate code for a <code>QAbstractTableModel</code>. The 2nd column (index = 1), is always a <code>comboBox</code>. That <code>comboBox</code> has a list of actions that a given Unit in my simulation can perform. Upon clicking certain actions like Build or Train, I want a Dialog to pop up ...
2
4,135
Rails : Couldn't find Item with 'id'=
<p>I'm trying to implement add to favorites and I'm getting this error: </p> <pre><code> ActiveRecord::RecordNotFound in FavoriteItemsController#index Couldn't find Item with 'id'= </code></pre> <p>this is where the error pops up, at the following link:</p> <pre><code>&lt;%= link_to "Favorite Items", favorites_pat...
2
1,376
Thread safety in wxpython
<p>I'm using wxpython to build the front-end GUI for a command-line tool that analyzes and processes audio files. The files are loaded into the GUI; then threads are launched that perform the analysis and adjustment steps; and finally the results of those processes are displayed in the main window. </p> <p>I have ende...
2
2,818
Allow TextView to be outside of Screen
<p>I want my TextView to be allowed out of the screen horizontally (And also disable horizontal scroll bars), such as this:</p> <p><img src="https://i.stack.imgur.com/APaJo.png" alt="enter image description here"></p> <p>However, the XML I have right now causes it to automatically fit inside the parent, such as this:...
2
1,659
MVVM Binding buttons in ListView item within a ItemTemplate
<p>In a UWP-Windows 10 C#/XAML app using MVVM and Template10, I'm currently trying to bind buttons inside a ListView item to methods in the ViewModel in the following way:</p> <pre><code>&lt;Page.Resources&gt; &lt;DataTemplate x:DataType="vm:ViewModel" x:Key="TermListViewTemplate"&gt; &lt;Grid&gt; ...
2
1,356
Android IP Camera
<p>I'm looking for a good working solution to integrate an IP-Cameras video stream in my Android App. At the moment i am using the "Axis P1214-E" which has a good image quality, but i couldn't get a "LIVE" stream from it. Either the stream is very laggy or it's a few seconds delayed (sometimes even more) or the stream ...
2
1,406
How can I make an animated Linear Gradient button?
<p>I am using React Native, and one of the components we need is a button with a gradient background. OnPress the colors should smoothly animate from their base value to their active value, and when you finish they should smoothly go back to their base value. I'm using a TouchableHighlight component to get access to th...
2
1,262
WCF string method that also serves a download with response.write - Only working in IE so far
<p>I have a WCF contract like this:</p> <pre><code>[OperationContract] [WebInvoke(Method = "POST")] string Import_CSV(); </code></pre> <p>And then the Import_CSV() method successfully accepts a file upload from HttpContext.Current.Request.Files... The Import_CSV() method returns a string with message of success or th...
2
1,538
Child background attribute override the parent rounded corners background
<p>I created a navigation bar using LinearLayout containing Clickable TextView's, for the containing LinearLayout I set a background shape XML for creating rounded corners, the problem is, when the user click on one of the tabs I set to the tab color backround, the rounded corners overwriting, the reason I set the roun...
2
1,112
Unable to add hint in android spinner
<p>I have a <code>spinner</code> that behaves like a <code>dropdown</code> in my <code>android application</code>. I am developing the app in <code>android studio</code>. The spinner get data from the <code>api</code>. At run time it gets <code>usernames</code> from <code>API</code> and shows in the <code>spinner</code...
2
3,933
Populating/patching values of angular reactive forms
<p>I'm curently working on crud application using angular 4, I'm wondering, how can I populate my reactive form with the data that's been parsed in the same row with the button that opens up the form, form is inside ngx-bootstrap modal and it should be the same one I have on the other button for adding new item/object?...
2
2,748
Trigger CSS animation fade-in & fade-out with JavaScript - only works in one direction?
<p>I am trying to build a menu that fades in and out on click. This is the code:</p> <p>HTML</p> <pre><code>&lt;div id="trigger"&gt;CLICK&lt;/div&gt; &lt;ul data-status="shown" id="navi"&gt; &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </...
2
1,028
Why isn't pull-right working for my Bootstrap navbar?
<p>See the Information section of the navbar <a href="http://www.collegeanswerz.com/university-of-pittsburgh/academics/professors/do-professors-explain-things-clearly-are-professors-interesting" rel="nofollow">here</a>. I'm trying to get it to float right. I used <code>.pull-right</code> like the Bootstrap docs <a href...
2
1,692
Loading of activity is very slow
<p>Hi I am developing an android SMS app. I hav an activity which loads the contacts into mPeopleList ArrayList as in below code which is called in doInBackground</p> <pre><code>public void PopulatePeopleList() { mPeopleList.clear(); Cursor people = getContentResolver().query(ContactsContract.Contacts.CONTENT...
2
1,293
System.InvalidCastException: Specified cast is not valid on editText.AddTextChangedListener
<p>When I try to reuse the formatting of the currency format using a separate class an error is generated.</p> <p>Main routine:</p> <pre><code>using Android.App; using Android.OS; using Android.Widget; namespace TextWatcher { [Activity(Label = "Main2", MainLauncher = true)] public class Main_Activity1 : Acti...
2
2,413
React Native CodePush Android Release Build not loading JS files
<p>I've done my best to follow the instructions <a href="https://github.com/Microsoft/react-native-code-push" rel="nofollow noreferrer">here</a> and <a href="http://microsoft.github.io/code-push/docs/react-native.html#link-7" rel="nofollow noreferrer">here</a>. The Android debug build (<code>react-native run-android</c...
2
2,707
403 CSRF error on page refresh after login() Django?
<p>So the code is very simple:</p> <p>views.py</p> <pre><code>@csrf_protect def index(request): global userPersonalInformation if request.method == "POST": username = request.POST['username'] password = request.POST['password'] user = authenticate(username=username, password=password) ...
2
1,452
How do I program an HTML page to update text imported from a text file on button click?
<p>I'm been having a lot of trouble figuring out a way to update the text in a section without having to reload the page. What I would like the code to do is update the text and a picture in a section (id="section2" below) when you click on one of the tabs. </p> <p>What I want the page to do when you click on one of t...
2
2,913
How to use Android Download Manager to download PDF generated from link, not direct PDF file path
<p>I have created webview of my website in android app. I am using Download Manager in Android to download a PDF file from my website. But there is not a direct link of PDF file, instead that PDF file is getting Generated and because of that thing, I am not able to download that file. Download is showing Unsuccessful. ...
2
1,164
MVC Razor Shared Layout Page Rendering Issue
<p>I have an MVC 5 App which uses Razor and a Shared_Layout File. They Layout file works fine and includes my menu's.</p> <p>The problem I have is when I try to use it in combination with a page used dhtmlxgannt jquery scripts. When I comment out the shared Layout, the page renders as I expect but I get no menu's at...
2
3,666
How to read excel file from external storage in android?
<p>I wrote a code that will generate graph from excel file(.xls) which would work perfectly but I have to put file in assets folder . Now I want to access file from external storage .</p> <p>XML Code:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android....
2
1,680
MediaBrowserCompat.ConnectionCallback.onConnected() is not being called after connect()
<p>I'm creating a player app for android and want to access <code>MediaControllerCompat</code> from any UI class. For this purpose I use <code>MediaBrowserCompat</code> class, I'm trying to connect it to my <code>MediaBrowserServiceCompat</code> and get <code>MediaControllerCompat</code> with <code>MediaSessionCompat.T...
2
1,657
Shorten long switch case
<p>So let me start by saying I am new to C#. I have a switch statement that currently has 10 different cases, however, I need to use it 3 different times (same 10 cases, different results per case), and each case there is only a slight change.</p> <p>I feel like I'm just repeating code, is there a way to shorten it?</...
2
2,021
Building a typing game in C#
<p>a few days back i started reading Head first C#, i use visual c# 2015 for building code and learning C# but however the book is based on visual studio 2010, i never ran into any problem so far while learning until i ran into this exercise when i have to build a typing game, i followed all the procedure as mentioned...
2
3,692
jqGrid - Custom button in nav bar added multiples times
<p>I've added a custom button on my nav bar:</p> <pre><code>function myFunc(){ $("#grid").jqGrid({ datatype: 'json', url: 'arquivo.jsp', jsonReader: {repeatitems: false, root: 'root'}, pager: '#paginado', rowNum: 10, autoencode: true, rowList: [10,20,30], emptyrecords: "Não há ...
2
1,504
python curses addstr error - but only on my computer
<p>I was writing a little program that takes a list and generates a menu out of it in curses (straight up, standard library or whatever, batteries included python's curses) when I noticed the strangest problem (if you'd like, a heavily commented copy of the entire program is below). Simply put, when accepting the resul...
2
1,175
bootstrap 3 navbar padding and items background
<p>I'm using bootstrap 3 to build a website. Could anyone please tell me how to remove the padding / margin for the menu items? It currently looks like this:</p> <p><img src="https://i.stack.imgur.com/yjVz3.png" alt="Bootstrap 3 navbar"></p> <p>And I would also like to have different link colors when hovering the ite...
2
1,295
Google Chrome Push Notification
<p>I am implementing chrome push notification for my website users. Which I am able to do successfully. I have two question ?</p> <p>1) how to get the previous subscription id whenever i block the notification from browser setting. I have to remove the subscription id from my backend server </p> <p>2) whenever i relo...
2
1,447
Allow Nullable<bool> in ASP.NET MVC form on submission
<p>I have a model with some properties being of type Nullable. </p> <pre><code>public Nullable&lt;bool&gt; Continuing { get; set; } public Nullable&lt;bool&gt; Incomplete { get; set; } //..etc other properties omitted for brevity </code></pre> <p>I have successfully bound this in a form with 3 radio buttons but when...
2
1,410
How to setup api calls in MERN Stack app (Server Side Rendering)
<p>I have created a react app that's a server side rendered, the problem am facing is setting up API calls. basically i want to get data from the database but i couldn't figure out how to do it properly.</p> <p>As you may know in the static MERN App / REST API the server sends data according to the requested routes th...
2
2,075
nullpointerexception when trying to reach activity
<p>I am getting nullpointerexception when trying to reach my activity and change some ints. This is what it looks like: <em>MainActivity.java</em></p> <pre><code> public class MainActivity extends Activity { public static SoundManager mSoundManager = new SoundManager(); private static final String TAG = M...
2
1,230
Reservoir Sampling on large Streams
<p>I am trying to implement a reservoir sampling algorithm using java. I have N streams of data ( readings from sensors arriving at a sink node ) of unknown size. For the sake of simplicity lets assume i have one stream of unknown size. </p> <p>So what one of the reservoir sampling algorithms suggests is to create a r...
2
1,682
Get checkbox values in jQuery?
<p>i'am working on checkboxes when user click checkbox i am checking is it checked or not if checked i update value on database here is my code</p> <pre><code>$(document).ready(function(){ $('input[type="checkbox"]').bind('click',function() { var tObj = $(this).val(); if ($('#checkpermission...
2
1,709
Why am I getting IOException and SocketException while writing to NetworkStream?
<p>I have a dll which connects me to a software, let's call it driver1. I have a java program which has to connect to driver1 and query its status. The dll provides me functions for connecting and querying the status.</p> <p>I wrote a c++ program which I gave the dll as a reference and I am able to use the dll from it...
2
1,466
JavaFX 8: TableView Filtering & Row Removal
<p>Please pardon the chunk of codes below, i'm presenting them for clarity. Thanks!</p> <p>I have a table view control [suiteCasesSelected] of type [TestSuiteDetail] that has the following functions:<br></p> <p><li> filter function that I got from this tutorial: <a href="http://code.makery.ch/blog/javafx-8-tableview-...
2
1,287
Installing .NET Framework from Wix
<p>I'm using WiX toolset v3.7 and Visual Studio 2013 to create an installer package for an Excel plugin. </p> <p>The plugin depends on .NET Framework 4.5 and I'd like the installer to automatically detect whether the required framework exists on the target machine and if not, install it.</p> <p>Googling got me to thi...
2
1,429
ListView inside ViewPager not scrolling
<p>I have a <code>ViewPager</code> in my activity. I use <code>Fragment</code> to display a list into <code>ViewPager</code>. In <code>ViewPager</code> I can set a <code>ListView</code>. <code>ListView</code> can display properly but <code>ListView</code> is not scrolling. So few item in list cannot be shown.</p> <p>H...
2
2,506
Consume an rpc-style soap webservice using Spring
<p>Im trying to consume an RPC-Style Soap WebService with Spring, I'm using this guide <a href="http://spring.io/guides/gs/consuming-web-service/" rel="nofollow">http://spring.io/guides/gs/consuming-web-service/</a> as an example. I'm stuck at the "...WebServiceTemplate().marshalSendAndReceive(request..." because the ...
2
2,286
Exception in my first SOAP client
<p>I'm trying to write a SOAP client for the service at <a href="https://webservice.kareo.com/services/soap/2.1/KareoServices.svc?wsdl" rel="nofollow">https://webservice.kareo.com/services/soap/2.1/KareoServices.svc?wsdl</a> </p> <p>I queried the types (_<em>getTypes) and functions (</em>_getFunctions) that the servi...
2
1,455
Amazon S3 upload image - using angular js directly from browser
<p>I am trying to upload images from my browser to Amazon S3 directly, using angular js.</p> <p>Below is my code. </p> <pre><code>function _upload($files) { $scope.file = $files[0]; $scope.creds = { access_key: '***', secret_key: '***', ...
2
1,338
I get this Tomcat Error on a dynamic web project
<pre><code>WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:proiect' did not find a matching property. Oct 18, 2015 11:25:22 PM org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Fai...
2
1,468
pand and zoom SVG image but when zoom in the image is not sharp
<p>I am developing an React Native project. Our backend returns a URL which points to a remote SVG image. I need to not only show the SVG but also be able to pan and zoom it in the mobile app.</p> <ul> <li>To show remote SVG image, I use <a href="https://www.npmjs.com/package/react-native-svg#use-with-content-loaded-fr...
2
1,120
Not able to capture data from an InputText inside a datatable in jsf
<p>I have a <code>datatable</code> where I have two columns.</p> <p>column 1 : output text, gets populated from bean data. coulmn 2 : input text boxes</p> <p>I have made column1 as a <code>commandLink</code> on which I have attached an <code>actionListener</code>. The aim is that When i click on a row on UI the sele...
2
2,183
Filtering a dataframe according to user input values in python
<p>I need to write a script in python prompting a user to select either the <strong>id is 19876/20807/13978/49999</strong>. Then taking in user input based on up to <strong>id</strong> <strong>column</strong> and <strong>their values</strong>, and returning the respective rows within a dataframe.</p> <p>For example, if...
2
1,147
NumberFormatException error while writing a dataframe to HDFS
<p>I am writing <code>dataframe</code> to <code>HDFS</code>, with following code</p> <pre><code>final_df.write.format("com.databricks.spark.csv").option("header", "true").save("path_to_hdfs") </code></pre> <p>and it is giving me the following error:</p> <pre><code>Caused by: java.lang.NumberFormatException: For inpu...
2
1,431
align components in grid: MDL
<p>I need help in arranging components inside the mdl card with grid. I am new to web design can some one help and explain how to arrange. Here I have created three cards and need to put toggle switch inside three cards.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false...
2
2,392
file upload in react. not able to understand issue
<p>Hi I Need to send one input filed and one file to server using react. I am using class component. My below code is not working properly. could you please check the same?</p> <p><a href="https://i.stack.imgur.com/WKrvU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WKrvU.png" alt="enter image desc...
2
1,773
update widget with multiple layouts
<p>I have an app that need to change different layouts for widget, depending on size, for exemple if widget is 4x2 cells then set up widget_layout, esle set up widget_layout1.</p> <p>For this change I use @Gogu's <a href="https://stackoverflow.com/a/14301127/3595288">method</a>:</p> <pre><code> @Override public vo...
2
1,334
python how to split test files from code into separate directories
<p>Below is a fizzbuzz program done TDD using unittest in one file, I run it in the command line using <code>python fizzbuzz.py -v</code>.</p> <pre><code>import unittest class FizzBuzz(): def fizz_buzz(self, number): if number % 3 == 0 and number % 5 == 0: return 'fizzbuzz' if number ...
2
1,184